Message217634
--- 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(). |
|
Date |
User |
Action |
Args |
2014-04-30 18:01:52 | berker.peksag | set | recipients:
+ berker.peksag, georg.brandl, terry.reedy, gregory.p.smith, ronaldoussoren, amaury.forgeotdarc, ncoghlan, alanmcintyre, NewerCookie, chuck, ethan.furman, serhiy.storchaka, apolkosnik |
2014-04-30 18:01:52 | berker.peksag | set | messageid: <1398880912.02.0.435489556932.issue6839@psf.upfronthosting.co.za> |
2014-04-30 18:01:51 | berker.peksag | link | issue6839 messages |
2014-04-30 18:01:51 | berker.peksag | create | |
|