diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2017-05-05 21:27:12 (GMT) |
---|---|---|
committer | Brett Cannon <brettcannon@users.noreply.github.com> | 2017-05-05 21:27:12 (GMT) |
commit | a12df7b7d40dbf47825917c8fa03d2c09b5a382c (patch) | |
tree | ad818268e3f1adb56743292245eac64c8ce9be20 /Lib/shutil.py | |
parent | a1054c3b0037d4c2a5492e79fc193f36245366c7 (diff) | |
download | cpython-a12df7b7d40dbf47825917c8fa03d2c09b5a382c.zip cpython-a12df7b7d40dbf47825917c8fa03d2c09b5a382c.tar.gz cpython-a12df7b7d40dbf47825917c8fa03d2c09b5a382c.tar.bz2 |
bpo-30218: support path-like objects in shutil.unpack_archive() (GH-1367)
Thanks to Jelle Zijlstra for the patch.
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 31536fe..464ee91 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -958,6 +958,9 @@ def unpack_archive(filename, extract_dir=None, format=None): if extract_dir is None: extract_dir = os.getcwd() + extract_dir = os.fspath(extract_dir) + filename = os.fspath(filename) + if format is not None: try: format_info = _UNPACK_FORMATS[format] |