Ignore attribute error when optimistically trying to cancel compression (we may have no ZipWriter object yet)

This commit is contained in:
Miguel Jacq 2018-09-30 16:52:48 +10:00
parent 2ffcdbb108
commit 4ffc0ddb82
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -56,5 +56,8 @@ class CompressThread(QtCore.QThread):
# Let the Web and ZipWriter objects know that we're canceling compression early
self.mode.web.cancel_compression = True
if self.mode.web.zip_writer:
try:
self.mode.web.zip_writer.cancel_compression = True
except AttributeError:
# we never made it as far as creating a ZipWriter object
pass