From 15ba6c3688feca4ae3533ea0686cc48872677e2b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 May 2020 10:19:24 +0000 Subject: [PATCH] Fix warnings --- daemon.py | 8 ++++---- git.py | 4 ++-- inbox.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/daemon.py b/daemon.py index 7de30ca2d..e78092feb 100644 --- a/daemon.py +++ b/daemon.py @@ -816,8 +816,8 @@ class PubServer(BaseHTTPRequestHandler): print('Queue: Inbox queue is full') self._503() self.server.POSTbusy = False - if not restartInboxQueueInProgress: - self.server.restartInboxQueue=True + if not self.server.restartInboxQueueInProgress: + self.server.restartInboxQueue = True return 2 # Convert the headers needed for signature verification to dict @@ -7268,8 +7268,8 @@ def runDaemon(blogsInstance: bool, mediaInstance: bool, args=(baseDir, httpd, 20), daemon=True) # flags used when restarting the inbox queue - httpd.restartInboxQueueInProgress=False - httpd.restartInboxQueue=False + httpd.restartInboxQueueInProgress = False + httpd.restartInboxQueue = False if not unitTest: print('Creating inbox queue watchdog') diff --git a/git.py b/git.py index 1fbf87fff..255ce858a 100644 --- a/git.py +++ b/git.py @@ -14,7 +14,7 @@ def extractPatch(baseDir: str, nickname: str, domain: str, """Is the given post content a git patch? """ # must have a subject line - if not subject: + if not subject: return False if '[PATCH]' not in content: return False @@ -48,7 +48,7 @@ def extractPatch(baseDir: str, nickname: str, domain: str, for line in patchLines: if line.startswith('Subject:'): patchSubject = \ - line.replace('Subject:','').replace('/','|').strip() + line.replace('Subject:', '').replace('/', '|').strip() patchDir = \ baseDir + '/accounts/' + nickname + '@' + domain + \ '/patches/' + projectName diff --git a/inbox.py b/inbox.py index 609f20c44..c36df8026 100644 --- a/inbox.py +++ b/inbox.py @@ -2186,14 +2186,14 @@ def runInboxQueueWatchdog(projectVersion: str, httpd) -> None: while True: time.sleep(20) if not httpd.thrInboxQueue.isAlive() or httpd.restartInboxQueue: - httpd.restartInboxQueueInProgress=True + httpd.restartInboxQueueInProgress = True httpd.thrInboxQueue.kill() httpd.thrInboxQueue = inboxQueueOriginal.clone(runInboxQueue) httpd.inboxQueue.clear() httpd.thrInboxQueue.start() print('Restarting inbox queue...') - httpd.restartInboxQueueInProgress=False - httpd.restartInboxQueue=False + httpd.restartInboxQueueInProgress = False + httpd.restartInboxQueue = False def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,