Ensure that there is an extra newline

main
Bob Mottram 2020-10-05 19:53:41 +01:00
parent 6997ae6e96
commit 80f7d85eb2
1 changed files with 2 additions and 0 deletions

View File

@ -2896,6 +2896,8 @@ class PubServer(BaseHTTPRequestHandler):
newswireTrustedFilename = baseDir + '/accounts/newswiretrusted.txt' newswireTrustedFilename = baseDir + '/accounts/newswiretrusted.txt'
if fields.get('trustedNewswire'): if fields.get('trustedNewswire'):
newswireTrusted = fields['trustedNewswire'] newswireTrusted = fields['trustedNewswire']
if not newswireTrusted.endswith('\n'):
newswireTrusted += '\n'
trustFile = open(newswireTrustedFilename, "w+") trustFile = open(newswireTrustedFilename, "w+")
if trustFile: if trustFile:
trustFile.write(newswireTrusted) trustFile.write(newswireTrusted)