summaryrefslogtreecommitdiff
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-02-26 05:58:48 -0800
committerLarry Hastings <larry@hastings.org>2015-02-26 05:58:48 -0800
commit8c3ec536e924002dc3afe4ff92e32fe9ed82ebab (patch)
treef141eec287584ba9d58d32461e1a7d92b5466e91 /Lib/pathlib.py
parente287746401398ee81c8e8a1513a5fe828eb32559 (diff)
parent7b2c3c6840052ea6f8b41253faf38b9e24f9a453 (diff)
downloadcpython-git-8c3ec536e924002dc3afe4ff92e32fe9ed82ebab.tar.gz
Merge 3.4.3 release engineering changes back into 3.4.
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 73fd432b6c..918ac8d563 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -73,6 +73,10 @@ class _Flavour(object):
# parts. This makes the result of parsing e.g.
# ("C:", "/", "a") reasonably intuitive.
for part in it:
+ if not part:
+ continue
+ if altsep:
+ part = part.replace(altsep, sep)
drv = self.splitroot(part)[0]
if drv:
break