Commit 5db246d1 authored by Fred Drake's avatar Fred Drake

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.
parent a77254a7
...@@ -10,9 +10,9 @@ try: ...@@ -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: ...@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment