diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-02 01:30:24 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-02 01:30:24 +0000 |
commit | 3b8e453c03edf1c28928f81f6b103bd9b4318aab (patch) | |
tree | 6fdac1b6e5062a763629b3936a95424ed3f5e5ef | |
parent | a73c32979f07ba27560a84a41532705f49535824 (diff) | |
download | portage-3b8e453c03edf1c28928f81f6b103bd9b4318aab.tar.gz portage-3b8e453c03edf1c28928f81f6b103bd9b4318aab.tar.bz2 portage-3b8e453c03edf1c28928f81f6b103bd9b4318aab.zip |
For bug #159638, fix the UnboundLocalError in vartree.getprovide().
svn path=/main/trunk/; revision=5440
-rw-r--r-- | pym/portage.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py index 82cafc643..dd22b2440 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5264,6 +5264,7 @@ class vartree(object): def get_provide(self,mycpv): myprovides=[] + mylines = None try: mylines, myuse = self.dbapi.aux_get(mycpv, ["PROVIDE","USE"]) if mylines: @@ -5278,11 +5279,13 @@ class vartree(object): except SystemExit, e: raise except Exception, e: - print - print "Check " + self.root+VDB_PATH+"/"+mycpv+"/PROVIDE and USE." - print "Possibly Invalid: " + str(mylines) - print "Exception: "+str(e) - print + mydir = os.path.join(self.root, VDB_PATH, mycpv) + writemsg("\nParse Error reading PROVIDE and USE in '%s'\n" % mydir, + noiselevel=-1) + if mylines: + writemsg("Possibly Invalid: '%s'\n" % str(mylines), + noiselevel=-1) + writemsg("Exception: %s\n\n" % str(e)) return [] def get_all_provides(self): |