Return early from finddigest if findname2 found nothing.
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Jan 2007 05:19:37 +0000 (05:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Jan 2007 05:19:37 +0000 (05:19 -0000)
svn path=/main/trunk/; revision=5589

pym/portage.py

index a76af264aa021d238cee59ecf51f4964b719deda..317b220036acb2b376c251e9418fac11d0c0b03c 100644 (file)
@@ -5562,6 +5562,8 @@ class portdbapi(dbapi):
        def finddigest(self,mycpv):
                try:
                        mydig   = self.findname2(mycpv)[0]
+                       if not mydig:
+                               return ""
                        mydigs  = string.split(mydig, "/")[:-1]
                        mydig   = string.join(mydigs, "/")