summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-08-13 17:42:57 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-08-13 17:42:57 (GMT)
commitb0df6a1afa585c5f4d097aeb68e41996a9fff9d7 (patch)
tree9f3a110448f52fcb8f325457f9534c08cb42204e /Lib/distutils
parent858e34f6499ede1c2ab6e1f188449e2c13ef5407 (diff)
downloadcpython-b0df6a1afa585c5f4d097aeb68e41996a9fff9d7.zip
cpython-b0df6a1afa585c5f4d097aeb68e41996a9fff9d7.tar.gz
cpython-b0df6a1afa585c5f4d097aeb68e41996a9fff9d7.tar.bz2
SF bug #574235, convert_path fails with empty pathname
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/util.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index d9c6224..8d22415 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -84,9 +84,11 @@ def convert_path (pathname):
"""
if os.sep == '/':
return pathname
- if pathname and pathname[0] == '/':
+ if not pathname:
+ return pathname
+ if pathname[0] == '/':
raise ValueError, "path '%s' cannot be absolute" % pathname
- if pathname and pathname[-1] == '/':
+ if pathname[-1] == '/':
raise ValueError, "path '%s' cannot end with '/'" % pathname
paths = string.split(pathname, '/')