diff --git a/daemon.py b/daemon.py index 3272e1734..7e23d07f1 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'):