mirror of https://github.com/python/cpython.git
Always use the same name for the exception defined in this module!
Error reported via email by Pete Shinners <pete@visionart.com>. Fixed some indentation inconsistencies.
This commit is contained in:
parent
a77254a724
commit
5db246d1fa
|
@ -10,9 +10,9 @@
|
|||
except:
|
||||
zlib = None
|
||||
|
||||
class _BadZipfile(Exception):
|
||||
class BadZipfile(Exception):
|
||||
pass
|
||||
error = _BadZipfile # The exception raised by this module
|
||||
error = BadZipfile # The exception raised by this module
|
||||
|
||||
# constants for Zip file compression methods
|
||||
ZIP_STORED = 0
|
||||
|
@ -180,7 +180,7 @@ def _GetContents(self):
|
|||
fname = fp.read(fheader[10])
|
||||
if fname != data.filename:
|
||||
raise RuntimeError, \
|
||||
'File name in Central Directory "%s" and File Header "%s" differ.' % (
|
||||
'File name in directory "%s" and header "%s" differ.' % (
|
||||
data.filename, fname)
|
||||
|
||||
def namelist(self):
|
||||
|
|
Loading…
Reference in New Issue