diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-19 08:00:07 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-19 08:00:07 (GMT) |
commit | 5bfc03f430ab13ed84c2c30f2c87e9800b5670a4 (patch) | |
tree | 65bd9f3891193717f61424862ad75b423281d066 /Lib/ntpath.py | |
parent | 6baa0a53b05d580d21d260c5d7d6ee2d3ff005ee (diff) | |
download | cpython-5bfc03f430ab13ed84c2c30f2c87e9800b5670a4.zip cpython-5bfc03f430ab13ed84c2c30f2c87e9800b5670a4.tar.gz cpython-5bfc03f430ab13ed84c2c30f2c87e9800b5670a4.tar.bz2 |
Issue #23780: Improved error message in os.path.join() with single argument.
Idea by R. David Murray.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index cfb4606..9cc5ca7 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -81,6 +81,8 @@ def join(path, *paths): seps = '\\/' colon = ':' try: + if not paths: + path[:0] + sep #23780: Ensure compatible data type even if p is null. result_drive, result_path = splitdrive(path) for p in paths: p_drive, p_path = splitdrive(p) |