From 8962c16670bdb01be7c7ffc4611fa81510d2672a Mon Sep 17 00:00:00 2001 From: cclauss Date: Fri, 17 May 2019 12:33:10 +0200 Subject: [PATCH] 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. --- src/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.py b/src/main.py index c3ea2176..b6d8c27d 100644 --- a/src/main.py +++ b/src/main.py @@ -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