summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-18 06:23:12 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-18 06:23:12 +0000
commit3aaee9a7c7ada5d332193213eb88d7b010b76ebd (patch)
tree958f76896b2179de692f449b78577e77839cd481 /pym
parentadd try finally blocks around locking for news (diff)
downloadportage-idfetch-3aaee9a7c7ada5d332193213eb88d7b010b76ebd.tar.gz
portage-idfetch-3aaee9a7c7ada5d332193213eb88d7b010b76ebd.tar.bz2
portage-idfetch-3aaee9a7c7ada5d332193213eb88d7b010b76ebd.zip
dump emerge's normpath in favor of portage_util's normalize_path
svn path=/main/trunk/; revision=5698
Diffstat (limited to 'pym')
-rw-r--r--pym/portage_util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py
index 40bdcb9c..cc5a566b 100644
--- a/pym/portage_util.py
+++ b/pym/portage_util.py
@@ -32,6 +32,11 @@ def writemsg_stdout(mystr,noiselevel=0):
writemsg(mystr, noiselevel=noiselevel, fd=sys.stdout)
def normalize_path(mypath):
+ """
+ os.path.normpath("//foo") returns "//foo" instead of "/foo"
+ We dislike this behavior so we create our own normpath func
+ to fix it.
+ """
if mypath.startswith(os.path.sep):
# posixpath.normpath collapses 3 or more leading slashes to just 1.
return os.path.normpath(2*os.path.sep + mypath)