handle exception while reading zip file

git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@807 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
Frédéric Lepied 2003-12-22 13:04:45 +00:00 committed by Ville Skyttä
parent d2f3f11a5e
commit f372e98e9a
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
# File : ZipCheck.py
# Package : rpmlint
# Author : Ville Skyttä
# Author : Ville Skytta
# Created on : Thu Oct 30 00:14:45 EET 2003
# Version : $Id$
# Purpose : Verify Zip/Jar file correctness
@ -62,8 +62,10 @@ class ZipCheck(AbstractCheck.AbstractCheck):
if want_indexed_jars:
printWarning(pkg, 'jar-not-indexed', i[0])
pass
finally:
zip and zip.close()
except:
sys.stderr.write('%s: unable-to-read-zip %s "%s"\n' % (pkg.name, i[0], sys.exc_info()[1]))
zip and zip.close()
check = ZipCheck()