From 4a0bdc5f9205a9c03ba2a13f34b960d524f98177 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 5 Sep 2010 00:07:11 -0700 Subject: Remove redundant initial os.sep argument to os.path.join() calls involving EROOT. --- bin/emaint | 4 ++-- pym/_emerge/actions.py | 2 +- pym/portage/_sets/files.py | 4 ++-- pym/portage/glsa.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/emaint b/bin/emaint index f11829897..1b1df71c1 100755 --- a/bin/emaint +++ b/bin/emaint @@ -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): diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 9e73d98a6..18052dcda 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -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 diff --git a/pym/portage/_sets/files.py b/pym/portage/_sets/files.py index 21993316b..995fda67b 100644 --- a/pym/portage/_sets/files.py +++ b/pym/portage/_sets/files.py @@ -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 diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py index b88a07662..6267b2cc0 100644 --- a/pym/portage/glsa.py +++ b/pym/portage/glsa.py @@ -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') -- cgit v1.2.3-1-g7c22