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 = ''
with open(followingFilename, 'r') as followingFile:
msg = followingFile.read()
followingList = msg.split('\n').sort()
print('followingList: ' + str(followingList))
followingList = msg.split('\n')
followingList.sort()
if followingList:
followingListHtml = '<html><body>'
for followingAddress in followingList:
followingListHtml += '<h3>' + followingAddress + '</h3>'
if followingAddress:
followingListHtml += \
'<h3>' + followingAddress + '</h3>'
followingListHtml += '</body></html>'
msg = followingListHtml
self._login_headers('text/html', len(msg), callingDomain)