Simplify binarytree.getname().
authorZac Medico <zmedico@gentoo.org>
Sun, 15 Oct 2006 07:26:01 +0000 (07:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 15 Oct 2006 07:26:01 +0000 (07:26 -0000)
svn path=/main/trunk/; revision=4704

pym/portage.py

index eae73be78f47de5a54afd29618c01ae7155c32f8..178dacf6228e200c82579a9180c2956bf08a3772 100644 (file)
@@ -5639,11 +5639,8 @@ class binarytree(packagetree):
 
        def getname(self,pkgname):
                "returns file location for this particular package"
-               mysplit=string.split(pkgname,"/")
-               if len(mysplit)==1:
-                       return self.pkgdir+"/All/"+self.resolve_specific(pkgname)+".tbz2"
-               else:
-                       return self.pkgdir+"/All/"+mysplit[1]+".tbz2"
+               return os.path.join(self.pkgdir,
+                       "All", catsplit(pkgname)[1] + ".tbz2")
 
        def isremote(self,pkgname):
                "Returns true if the package is kept remotely."