|
@@ -46,12 +46,8 @@ def _get_status(this_id):
|
|
|
this_status = this_json
|
|
this_status = this_json
|
|
|
# pprint(this_status)
|
|
# pprint(this_status)
|
|
|
status_return = None
|
|
status_return = None
|
|
|
- if 'alert' not in this_status:
|
|
|
|
|
- print('alert not in this_status')
|
|
|
|
|
- pprint(this_status)
|
|
|
|
|
- this_status['alert'] = {'15': False, '10': False, '5': False, '1': False}
|
|
|
|
|
if this_status:
|
|
if this_status:
|
|
|
- status_return = this_status['status'], this_status['name'], this_status['timestamp'], this_status['alert']
|
|
|
|
|
|
|
+ status_return = this_status['status'], this_status['name'], this_status['timestamp']
|
|
|
return status_return
|
|
return status_return
|
|
|
|
|
|
|
|
|
|
|
|
@@ -76,14 +72,14 @@ def _from_roman_to_integer(roman_number):
|
|
|
|
|
|
|
|
def get_loot_level(this_id):
|
|
def get_loot_level(this_id):
|
|
|
this_loot_level = 0
|
|
this_loot_level = 0
|
|
|
- this_status_status, this_status_name, this_status_timestamp, this_status_alert = _get_status(this_id)
|
|
|
|
|
|
|
+ this_status_status, this_status_name, this_status_timestamp = _get_status(this_id)
|
|
|
if this_status_status and len(this_status_status) > 1:
|
|
if this_status_status and len(this_status_status) > 1:
|
|
|
if this_status_status[0] == 'Okay' and 'Loot level' in this_status_status[1]:
|
|
if this_status_status[0] == 'Okay' and 'Loot level' in this_status_status[1]:
|
|
|
this_loot_level = this_status_status[1][11:].strip()
|
|
this_loot_level = this_status_status[1][11:].strip()
|
|
|
# print(this_loot_level)
|
|
# print(this_loot_level)
|
|
|
this_integer = _from_roman_to_integer(this_loot_level)
|
|
this_integer = _from_roman_to_integer(this_loot_level)
|
|
|
this_status_dict = {"id": this_id, "name": this_status_name, "integer": this_integer, "roman": this_loot_level,
|
|
this_status_dict = {"id": this_id, "name": this_status_name, "integer": this_integer, "roman": this_loot_level,
|
|
|
- "text": this_status_status, "timestamp": this_status_timestamp, "alert": this_status_alert}
|
|
|
|
|
|
|
+ "text": this_status_status, "timestamp": this_status_timestamp}
|
|
|
return this_status_dict
|
|
return this_status_dict
|
|
|
|
|
|
|
|
|
|
|