Berker Peksag added the comment: --- a/zipfile.py Wed Apr 30 11:27:16 2014 +++ b/zipfile.py Wed Apr 30 11:27:01 2014 @@ -1174,8 +1174,9 @@ else: fname_str = fname.decode("cp437") - if fname_str != zinfo.orig_filename: - raise BadZipFile( + if self.debug and fname_str != zinfo.orig_filename: + import warnings + warnings.warn( 'File name in directory %r and header %r differ.' % (zinfo.orig_filename, fname))
Also, you need to add ``stacklevel=2`` to warnings.warn(). ---------- nosy: +berker.peksag _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6839> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com