Sort following list

main
Bob Mottram 2020-06-28 22:35:17 +01:00
parent a8532aa996
commit 26029f1b1a
1 changed files with 5 additions and 3 deletions

View File

@ -1650,12 +1650,14 @@ class PubServer(BaseHTTPRequestHandler):
msg = '' msg = ''
with open(followingFilename, 'r') as followingFile: with open(followingFilename, 'r') as followingFile:
msg = followingFile.read() msg = followingFile.read()
followingList = msg.split('\n').sort() followingList = msg.split('\n')
print('followingList: ' + str(followingList)) followingList.sort()
if followingList: if followingList:
followingListHtml = '<html><body>' followingListHtml = '<html><body>'
for followingAddress in followingList: for followingAddress in followingList:
followingListHtml += '<h3>' + followingAddress + '</h3>' if followingAddress:
followingListHtml += \
'<h3>' + followingAddress + '</h3>'
followingListHtml += '</body></html>' followingListHtml += '</body></html>'
msg = followingListHtml msg = followingListHtml
self._login_headers('text/html', len(msg), callingDomain) self._login_headers('text/html', len(msg), callingDomain)