This commit is contained in:
KF7EEL 2021-03-05 07:27:25 -08:00 committed by GitHub
parent 6a6fdf367a
commit 247168d567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ def mailbox_write(call, dmr_id, time, message, recipient):
global mailbox_file global mailbox_file
mail_file = ast.literal_eval(os.popen('cat ' + parser.get('GPS_DATA', 'MAILBOX_FILE')).read()) mail_file = ast.literal_eval(os.popen('cat ' + parser.get('GPS_DATA', 'MAILBOX_FILE')).read())
mail_file.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'message':message, 'recipient': recipient}) mail_file.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'message':message, 'recipient': recipient})
with openparser.get('GPS_DATA', 'MAILBOX_FILE'), 'w') as mailbox_file: with open(parser.get('GPS_DATA', 'MAILBOX_FILE'), 'w') as mailbox_file:
mailbox_file.write(str(mail_file[:100])) mailbox_file.write(str(mail_file[:100]))
mailbox_file.close() mailbox_file.close()
print('User mail saved.') print('User mail saved.')