From a8532aa99654c509767323a1748ba276e1e1d594 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 28 Jun 2020 22:30:02 +0100 Subject: [PATCH] Debug --- daemon.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 3272e173..7e23d07f 100644 --- a/daemon.py +++ b/daemon.py @@ -1651,13 +1651,15 @@ class PubServer(BaseHTTPRequestHandler): with open(followingFilename, 'r') as followingFile: msg = followingFile.read() followingList = msg.split('\n').sort() - followingListHtml = '' - for followingAddress in followingList: - followingListHtml += '

' + followingAddress + '

' - followingListHtml += '' - msg = followingListHtml.encode('utf-8') + print('followingList: ' + str(followingList)) + if followingList: + followingListHtml = '' + for followingAddress in followingList: + followingListHtml += '

' + followingAddress + '

' + followingListHtml += '' + msg = followingListHtml self._login_headers('text/html', len(msg), callingDomain) - self._write(msg) + self._write(msg.encode('utf-8')) return if self.path.startswith('/about'):