1
0
mirror of https://gitlab.com/openlp/openlp.git synced 2024-10-01 04:17:34 +00:00

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:
outfile = open(fullpath, u'wb')
outfile.write(zip.read(file))
except (IOError, NameError):
except (IOError, NameError, zipfile.BadZipfile):
critical_error_message_box(
translate('OpenLP.ThemeManager', 'Validation Error'),
translate('OpenLP.ThemeManager', 'File is not a valid theme.'))