Kaydet (Commit) 464023fb authored tarafından Greg Ward's avatar Greg Ward

Lyle Johnson: fixed broken logic in 'native_path()'.

üst e92e610a
...@@ -72,11 +72,11 @@ def native_path (pathname): ...@@ -72,11 +72,11 @@ def native_path (pathname):
raise ValueError, "path '%s' cannot be absolute" % pathname raise ValueError, "path '%s' cannot be absolute" % pathname
if pathname[-1] == '/': if pathname[-1] == '/':
raise ValueError, "path '%s' cannot end with '/'" % pathname raise ValueError, "path '%s' cannot end with '/'" % pathname
if os.sep != '/' and os.sep in pathname: if os.sep != '/':
if os.sep in pathname:
raise ValueError, \ raise ValueError, \
"path '%s' cannot contain '%c' character" % \ "path '%s' cannot contain '%c' character" % (pathname, os.sep)
(pathname, os.sep) else:
paths = string.split (pathname, '/') paths = string.split (pathname, '/')
return apply (os.path.join, paths) return apply (os.path.join, paths)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment