mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
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
1 changed files with 12 additions and 12 deletions
|
@ -10,9 +10,9 @@ try:
|
||||||
except:
|
except:
|
||||||
zlib = None
|
zlib = None
|
||||||
|
|
||||||
class _BadZipfile(Exception):
|
class BadZipfile(Exception):
|
||||||
pass
|
pass
|
||||||
error = _BadZipfile # The exception raised by this module
|
error = BadZipfile # The exception raised by this module
|
||||||
|
|
||||||
# constants for Zip file compression methods
|
# constants for Zip file compression methods
|
||||||
ZIP_STORED = 0
|
ZIP_STORED = 0
|
||||||
|
@ -180,7 +180,7 @@ class ZipFile:
|
||||||
fname = fp.read(fheader[10])
|
fname = fp.read(fheader[10])
|
||||||
if fname != data.filename:
|
if fname != data.filename:
|
||||||
raise RuntimeError, \
|
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)
|
data.filename, fname)
|
||||||
|
|
||||||
def namelist(self):
|
def namelist(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue