homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author berker.peksag
Recipients NewerCookie, alanmcintyre, amaury.forgeotdarc, apolkosnik, berker.peksag, chuck, ethan.furman, georg.brandl, gregory.p.smith, ncoghlan, ronaldoussoren, serhiy.storchaka, terry.reedy
Date 2014年04月30日.18:01:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398880912.02.0.435489556932.issue6839@psf.upfronthosting.co.za>
In-reply-to
Content
--- 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().
History
Date User Action Args
2014年04月30日 18:01:52berker.peksagsetrecipients: + 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:52berker.peksagsetmessageid: <1398880912.02.0.435489556932.issue6839@psf.upfronthosting.co.za>
2014年04月30日 18:01:51berker.peksaglinkissue6839 messages
2014年04月30日 18:01:51berker.peksagcreate

AltStyle によって変換されたページ (->オリジナル) /