Set self.cancel_compression to false in the set_file_info() function instead of Web's constructor, so it gets reset every time

This commit is contained in:
Micah Lee 2018-09-18 16:28:54 -07:00
parent c52c846227
commit 0234ff5f37
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -105,7 +105,6 @@ class Web(object):
self.zip_filename = None
self.zip_filesize = None
self.zip_writer = None
self.cancel_compression = False
self.security_headers = [
('Content-Security-Policy', 'default-src \'self\'; style-src \'self\'; script-src \'self\'; img-src \'self\' data:;'),
@ -518,6 +517,8 @@ class Web(object):
page will need to display. This includes zipping up the file in order to
get the zip file's name and size.
"""
self.cancel_compression = False
# build file info list
self.file_info = {'files': [], 'dirs': []}
for filename in filenames: