Eliminate redundant os.sep in vardbapi._bump_mtime. Thanks to
authorZac Medico <zmedico@gentoo.org>
Thu, 6 May 2010 19:08:28 +0000 (12:08 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 May 2010 19:08:28 +0000 (12:08 -0700)
grobian for reporting.

pym/portage/dbapi/vartree.py

index 1b97c382f8314de132473302d4fd03b44f89c594..de583e7b5b8544d74b0300f8792df87aad024b07 100644 (file)
@@ -822,6 +822,8 @@ class vardbapi(dbapi):
                """
                self.root = _unicode_decode(root,
                        encoding=_encodings['content'], errors='strict')
+               if self.root[-1] != '/':
+                       self.root += '/'
 
                # Used by emerge to check whether any packages
                # have been added or removed.
@@ -880,7 +882,7 @@ class vardbapi(dbapi):
                This is called before an after any modifications, so that consumers
                can use directory mtimes to validate caches. See bug #290428.
                """
-               base = self.root + _os.sep + VDB_PATH
+               base = self.root + VDB_PATH
                cat = catsplit(cpv)[0]
                catdir = base + _os.sep + cat
                t = time.time()