forked from openlp/openlp
fixed BadZipfile exception
This commit is contained in:
parent
aff94e1b8d
commit
4c4dfcc6c5
@ -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.'))
|
||||||
|
Loading…
Reference in New Issue
Block a user