Declare 'err' because Python 3 has stricter scoping rules

I Python 3, __err__ will go out of scope after the __try / except__ block.  This change preserves the value after the end of the __try / except__ block.
This commit is contained in:
cclauss 2019-05-17 12:33:10 +02:00 committed by GitHub
parent 2ed1572c3c
commit 8962c16670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -208,6 +208,7 @@ class Actions(object):
for content_inner_path in site.content_manager.contents:
s = time.time()
logging.info("Verifing %s signature..." % content_inner_path)
err = None
try:
file_correct = site.content_manager.verifyFile(
content_inner_path, site.storage.open(content_inner_path, "rb"), ignore_same=False