summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-05-31 02:32:10 (GMT)
committerGreg Ward <gward@python.net>2000-05-31 02:32:10 (GMT)
commitd8dfb4c4b8d661acee263e3feb77974ced69e97d (patch)
tree19fd4f8d8b032f885118e9e181d67b87820e8762 /Lib/distutils/util.py
parent65bc20c23e22543e13ff6d1fbdf51705a0b5aa1a (diff)
downloadcpython-d8dfb4c4b8d661acee263e3feb77974ced69e97d.zip
cpython-d8dfb4c4b8d661acee263e3feb77974ced69e97d.tar.gz
cpython-d8dfb4c4b8d661acee263e3feb77974ced69e97d.tar.bz2
Renamed 'native_path()' to 'convert_path()'.
Also changed it so it doesn't barf if the path is already in native format (ie. contains os.sep).
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r--Lib/distutils/util.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 6063aa6..5754638 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -58,7 +58,7 @@ def get_platform ():
# get_platform()
-def native_path (pathname):
+def convert_path (pathname):
"""Return 'pathname' as a name that will work on the native
filesystem, i.e. split it on '/' and put it back together again
using the current directory separator. Needed because filenames in
@@ -73,16 +73,12 @@ def native_path (pathname):
if pathname[-1] == '/':
raise ValueError, "path '%s' cannot end with '/'" % pathname
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)
+ paths = string.split (pathname, '/')
+ return apply (os.path.join, paths)
else:
return pathname
-# native_path ()
+# convert_path ()
def change_root (new_root, pathname):