New submission from Evan Dandrea <e...@ubuntu.com>:

Passing the format keyword parameter to shutil.unpack_archive triggers an 
exception:

Traceback (most recent call last):
  File "Lib/test/test_shutil.py", line 650, in test_unpack_archive
    unpack_archive(filename, tmpdir2, format=format)
  File "/home/evan/hg/cpython/Lib/shutil.py", line 741, in unpack_archive
    func(filename, extract_dir, **dict(format_info[1]))
TypeError: 'function' object is not iterable

This is due to that function incorrectly using the _UNPACK_FORMATS dictionary, 
which is fixed with the attached patch and test case.

----------
components: Library (Lib)
files: fix_unpack_with_format.patch
keywords: patch
messages: 130948
nosy: ev, tarek
priority: normal
severity: normal
status: open
title: Passing format= to unpack_archive fails
type: crash
Added file: http://bugs.python.org/file21196/fix_unpack_with_format.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11548>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to