diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-19 02:48:47 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-19 02:48:47 +0000 |
commit | f56ee8cd2fa86ba74c3b67b1b4edcb6eca76766b (patch) | |
tree | 39d707e9c8598a6b0e8445aa4ae53aae0fc11c74 /pym | |
parent | 4d2bb88cb90e8dba5e343ec9f6cc30b50bc1387a (diff) | |
download | portage-f56ee8cd2fa86ba74c3b67b1b4edcb6eca76766b.tar.gz portage-f56ee8cd2fa86ba74c3b67b1b4edcb6eca76766b.tar.bz2 portage-f56ee8cd2fa86ba74c3b67b1b4edcb6eca76766b.zip |
dump emerge's normpath in favor of portage_util's normalize_path (trunk r5698)v2.1.2-r1
svn path=/main/branches/2.1.2/; revision=5720
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage_util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py index 40bdcb9cf..cc5a566b8 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) |