Remove redundant initial os.sep argument to os.path.join() calls
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 07:07:11 +0000 (00:07 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 07:07:11 +0000 (00:07 -0700)
involving EROOT.

bin/emaint
pym/_emerge/actions.py
pym/portage/_sets/files.py
pym/portage/glsa.py

index f11829897cd39a9dfbbef8f4581002f8a60c69fb..1b1df71c11b5d617d9f9aa4b7d5ba9fb7baa494d 100755 (executable)
@@ -389,7 +389,7 @@ class VdbKeyHandler(object):
                self.keys = ["HOMEPAGE", "SRC_URI", "KEYWORDS", "DESCRIPTION"]
                
                for p in self.list:
-                       mydir = os.path.join(os.sep, portage.settings["EROOT"], portage.const.VDB_PATH, p)+os.sep
+                       mydir = os.path.join(portage.settings["EROOT"], portage.const.VDB_PATH, p)+os.sep
                        ismissing = True
                        for k in self.keys:
                                if os.path.exists(mydir+k):
@@ -406,7 +406,7 @@ class VdbKeyHandler(object):
                errors = []
        
                for p in self.missing:
-                       mydir = os.path.join(os.sep, portage.settings["EROOT"], portage.const.VDB_PATH, p)+os.sep
+                       mydir = os.path.join(portage.settings["EROOT"], portage.const.VDB_PATH, p)+os.sep
                        if not os.access(mydir+"environment.bz2", os.R_OK):
                                errors.append("Can't access %s" % (mydir+"environment.bz2"))
                        elif not os.access(mydir, os.W_OK):
index 9e73d98a621889007659c2679fc9b6208fbd620d..18052dcdace57898c4a855ec0533fbc2556e78f5 100644 (file)
@@ -2790,7 +2790,7 @@ def load_emerge_config(trees=None):
                        settings = trees[myroot]["vartree"].settings
                        break
 
-       mtimedbfile = os.path.join(os.path.sep, settings['EROOT'], portage.CACHE_PATH, "mtimedb")
+       mtimedbfile = os.path.join(settings['EROOT'], portage.CACHE_PATH, "mtimedb")
        mtimedb = portage.MtimeDB(mtimedbfile)
        portage.output._init(config_root=settings['PORTAGE_CONFIGROOT'])
        QueryCommand._db = trees
index 21993316b3b6ee828ec0cc77742e6225cfa07e14..995fda67bf978415721ad0ec6d748b58ce441696 100644 (file)
@@ -213,11 +213,11 @@ class WorldSelectedSet(EditablePackageSet):
                # most attributes exist twice as atoms and non-atoms are stored in 
                # separate files
                self._lock = None
-               self._filename = os.path.join(os.sep, eroot, WORLD_FILE)
+               self._filename = os.path.join(eroot, WORLD_FILE)
                self.loader = ItemFileLoader(self._filename, self._validate)
                self._mtime = None
                
-               self._filename2 = os.path.join(os.sep, eroot, WORLD_SETS_FILE)
+               self._filename2 = os.path.join(eroot, WORLD_SETS_FILE)
                self.loader2 = ItemFileLoader(self._filename2, self._validate2)
                self._mtime2 = None
                
index b88a076626fb30208713de2d80ad63dbcac1920a..6267b2cc058173353c68c99ef4e3bc625f2b56bf 100644 (file)
@@ -36,7 +36,7 @@ def get_applied_glsas(settings):
        @rtype:         list
        @return:        list of glsa IDs
        """
-       return grabfile(os.path.join(os.sep, settings["EROOT"], CACHE_PATH, "glsa"))
+       return grabfile(os.path.join(settings["EROOT"], CACHE_PATH, "glsa"))
 
 
 # TODO: use the textwrap module instead
@@ -666,7 +666,7 @@ class Glsa:
                """
                if not self.isApplied():
                        checkfile = codecs.open(
-                               _unicode_encode(os.path.join(os.sep, self.config["EROOT"],
+                               _unicode_encode(os.path.join(self.config["EROOT"],
                                CACHE_PATH, "glsa"),
                                encoding=_encodings['fs'], errors='strict'), 
                                mode='a+', encoding=_encodings['content'], errors='strict')