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:
Fred Drake 2000-09-29 20:44:48 +00:00
parent a77254a724
commit 5db246d1fa
1 changed files with 12 additions and 12 deletions

View File

@ -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):