fixed BadZipfile exception

This commit is contained in:
Andreas Preikschat 2011-03-19 16:43:25 +01:00
parent aff94e1b8d
commit 4c4dfcc6c5

View File

@ -547,7 +547,7 @@ class ThemeManager(QtGui.QWidget):
else: else:
outfile = open(fullpath, u'wb') outfile = open(fullpath, u'wb')
outfile.write(zip.read(file)) outfile.write(zip.read(file))
except (IOError, NameError): except (IOError, NameError, zipfile.BadZipfile):
critical_error_message_box( critical_error_message_box(
translate('OpenLP.ThemeManager', 'Validation Error'), translate('OpenLP.ThemeManager', 'Validation Error'),
translate('OpenLP.ThemeManager', 'File is not a valid theme.')) translate('OpenLP.ThemeManager', 'File is not a valid theme.'))