|
|
@@ -31,19 +31,19 @@ if __name__ == '__main__':
|
|
|
send_message = False
|
|
|
# print('if old_status {} != status[1] {}'.format(old_status, status[1]))
|
|
|
assert type(old_status) is int, f"old_status {old_status} is not an integer: {type(old_status)}"
|
|
|
- assert type(status[1]) is int, f"status[1] {status[1]} is not an integer: {type(status[1])}"
|
|
|
- if old_status != status[1]:
|
|
|
+ assert type(status['integer']) is int, f"status['integer'] {status['integer']} is not an integer: {type(status['integer'])}"
|
|
|
+ if old_status != status['integer']:
|
|
|
write_file_next = True
|
|
|
send_message = True
|
|
|
# print('write_file_next: {}'.format(write_file_next))
|
|
|
if write_file_next:
|
|
|
- summary = {'text': status[2], 'roman': status[0], 'integer': status[1]}
|
|
|
- pprint(summary)
|
|
|
- summary_json = json.dumps(summary, indent=2)
|
|
|
+ # summary = {'text': status["status"], 'roman': status["roman"], 'integer': status["integer"]}
|
|
|
+ pprint(status)
|
|
|
+ summary_json = json.dumps(status, indent=2)
|
|
|
print(summary_json)
|
|
|
write_file = open('status.json', 'w')
|
|
|
write_file.write(summary_json)
|
|
|
write_file.close()
|
|
|
|
|
|
if send_message:
|
|
|
- view.send_message(status[1])
|
|
|
+ view.send_message(status["integer"])
|