From a7dc83813c4538f586c24e9601a212543a2ca752 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 28 Jun 2020 20:04:43 +0100 Subject: [PATCH] Tidying --- daemon.py | 2 +- inbox.py | 2 +- session.py | 5 ++--- webinterface.py | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 2850e2a0..d5e11728 100644 --- a/daemon.py +++ b/daemon.py @@ -3383,7 +3383,7 @@ class PubServer(BaseHTTPRequestHandler): print('Error replying to ' + inReplyToUrl) self._404() self.server.GETbusy = False - return + return self._set_headers('text/html', len(msg), cookie, callingDomain) self._write(msg) diff --git a/inbox.py b/inbox.py index aa1efa10..24006d54 100644 --- a/inbox.py +++ b/inbox.py @@ -2594,7 +2594,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int, if len(queue) > 0: queue.pop(0) print('Queue: Follow activity for ' + keyId + - ' removed from accepted from queue') + ' removed from queue') continue else: if debug: diff --git a/session.py b/session.py index 60b0a71b..1547c028 100644 --- a/session.py +++ b/session.py @@ -169,9 +169,8 @@ def postJsonString(session, postJsonStr: str, if postResult.status_code >= 400 and \ postResult.status_code <= 405 and \ postResult.status_code != 404: - print('WARN: >>> Post to ' + inboxUrl + - ' is unauthorized. Code ' + - str(postResult.status_code) + ' <<<') + print('WARN: Post to ' + inboxUrl + ' is unauthorized. Code ' + + str(postResult.status_code)) return False, True else: print('WARN: Failed to post to ' + inboxUrl + diff --git a/webinterface.py b/webinterface.py index ec8ff628..643b9969 100644 --- a/webinterface.py +++ b/webinterface.py @@ -6077,7 +6077,8 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int, avatarDescription = '' if profileJson.get('summary'): if isinstance(profileJson['summary'], str): - avatarDescription = profileJson['summary'].replace('
', '\n') + avatarDescription = \ + profileJson['summary'].replace('
', '\n') avatarDescription = avatarDescription.replace('

', '') avatarDescription = avatarDescription.replace('

', '') profileStr = '
'