From 454b4f3348d1a917defb20a1569645c985eee972 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 6 Oct 2020 19:32:24 +0100 Subject: [PATCH] Backtracking --- newswire.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/newswire.py b/newswire.py index 0b0e9ffa..ff227473 100644 --- a/newswire.py +++ b/newswire.py @@ -239,24 +239,6 @@ def addAccountBlogsToNewswire(baseDir: str, nickname: str, domain: str, break -def isTrustedByNewswire(baseDir: str, nickname: str) -> bool: - """Returns true if the given nickname is trusted to post - blog entries to the newswire - """ - # adminNickname = getConfigParam(baseDir, 'admin') - # if nickname == adminNickname: - # return True - - newswireTrustedFilename = baseDir + '/accounts/newswiretrusted.txt' - if os.path.isfile(newswireTrustedFilename): - with open(newswireTrustedFilename, "r") as f: - lines = f.readlines() - for trusted in lines: - if trusted.strip('\n').strip('\r') == nickname: - return True - return False - - def addBlogsToNewswire(baseDir: str, newswire: {}, maxBlogsPerAccount: int) -> None: """Adds blogs from each user account into the newswire @@ -277,10 +259,6 @@ def addBlogsToNewswire(baseDir: str, newswire: {}, if isSuspended(baseDir, nickname): continue - # is this account trusted? - if not isTrustedByNewswire(baseDir, nickname): - continue - # is there a blogs timeline for this account? accountDir = os.path.join(baseDir + '/accounts', handle) blogsIndex = accountDir + '/tlblogs.index'