diff options
author | Greg Ward <gward@python.net> | 2000-04-25 01:33:11 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-04-25 01:33:11 (GMT) |
commit | 464023fb64dd590b91cab7059dffdf0756eecbce (patch) | |
tree | a3286e9c7b64f58edb1a214110066d0963bb9e71 /Lib/distutils/util.py | |
parent | e92e610a9e0ec78bf9dd4965b980f1b57eeb040e (diff) | |
download | cpython-464023fb64dd590b91cab7059dffdf0756eecbce.zip cpython-464023fb64dd590b91cab7059dffdf0756eecbce.tar.gz cpython-464023fb64dd590b91cab7059dffdf0756eecbce.tar.bz2 |
Lyle Johnson: fixed broken logic in 'native_path()'.
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r-- | Lib/distutils/util.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 9c436b9..ca20ae0 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -72,13 +72,13 @@ def native_path (pathname): raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname - if os.sep != '/' and os.sep in pathname: - raise ValueError, \ - "path '%s' cannot contain '%c' character" % \ - (pathname, os.sep) - - paths = string.split (pathname, '/') - return apply (os.path.join, paths) + if os.sep != '/': + if os.sep in pathname: + raise ValueError, \ + "path '%s' cannot contain '%c' character" % (pathname, os.sep) + else: + paths = string.split (pathname, '/') + return apply (os.path.join, paths) else: return pathname |