def _GetContents(self):
try:<EOL><INDENT>self._RealGetContents()<EOL><DEDENT>except BadZipfile:<EOL><INDENT>if not self._filePassed:<EOL><INDENT>self.fp.close()<EOL>self.fp = None<EOL><DEDENT>raise<EOL><DEDENT>
Read the directory, making sure we close the file if the format
        is bad.