mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Close #11548: Correctly handle format argument in shutil.unpack_archive
This commit is contained in:
parent
a78e4e6daf
commit
abf202d798
2 changed files with 10 additions and 2 deletions
|
@ -737,8 +737,8 @@ def unpack_archive(filename, extract_dir=None, format=None):
|
|||
except KeyError:
|
||||
raise ValueError("Unknown unpack format '{0}'".format(format))
|
||||
|
||||
func = format_info[0]
|
||||
func(filename, extract_dir, **dict(format_info[1]))
|
||||
func = format_info[1]
|
||||
func(filename, extract_dir, **dict(format_info[2]))
|
||||
else:
|
||||
# we need to look at the registered unpackers supported extensions
|
||||
format = _find_unpack_format(filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue