Issue #23780: Improved error message in os.path.join() with single argument.

Idea by R. David Murray.
This commit is contained in:
Serhiy Storchaka 2015-05-19 11:00:07 +03:00
parent 6baa0a53b0
commit 5bfc03f430
5 changed files with 12 additions and 0 deletions

View file

@ -53,6 +53,8 @@ def join(s, *p):
try:
colon = _get_colon(s)
path = s
if not p:
path[:0] + colon #23780: Ensure compatible data type even if p is null.
for t in p:
if (not path) or isabs(t):
path = t