From 1576db8ae36658de1a55caa3298e61609e54eba6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 21 Jun 2021 12:10:08 +0100 Subject: [PATCH] Tidying --- blocking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocking.py b/blocking.py index 53346c136..2902af43f 100644 --- a/blocking.py +++ b/blocking.py @@ -210,8 +210,7 @@ def isBlockedDomain(baseDir: str, domain: str, if noOfSections > 2: shortDomain = domain[noOfSections-2] + '.' + domain[noOfSections-1] - allowFilename = baseDir + '/accounts/allowedinstances.txt' - if not os.path.isfile(allowFilename): + if not brochModeIsActive(baseDir): if blockedCache: for blockedStr in blockedCache: if '*@' + domain in blockedStr: @@ -231,6 +230,7 @@ def isBlockedDomain(baseDir: str, domain: str, if '*@' + shortDomain in blockedStr: return True else: + allowFilename = baseDir + '/accounts/allowedinstances.txt' # instance allow list if not shortDomain: if domain not in open(allowFilename).read():