added try exception for period_data not available, running through now anyway
This commit is contained in:
parent
157cab2910
commit
d6427a9cdc
3 changed files with 9 additions and 5 deletions
|
@ -655,10 +655,14 @@ if __name__ == '__main__':
|
|||
|
||||
now = datetime.datetime.now()
|
||||
now_formatted = dateutil.parser.parse(str(now))
|
||||
delta = period_data_formatted - now_formatted
|
||||
|
||||
print('delta', delta, int(delta.days))
|
||||
if message_was_already_there == False and int(delta.days) < int(room_deadline_days):
|
||||
try:
|
||||
delta = period_data_formatted - now_formatted
|
||||
days_to_check = delta.days
|
||||
except Exception as e:
|
||||
days_to_check = int(room_deadline_days) - 1
|
||||
print('calc of delta did now work, original error is:', e)
|
||||
#print('delta', delta, int(delta.days))
|
||||
if message_was_already_there == False and int(days_to_check) < int(room_deadline_days):
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
updaterooms 65afc67d7954218b50162c22§%§%kr2Qt7t4a3dNCDYqm
|
||||
updaterooms 65afd8b77954218b501634f2§%§%Z4SCmA6Ydbs7YHHHo
|
0
roomhistories/65afd8b77954218b501634f2.txt
Normal file
0
roomhistories/65afd8b77954218b501634f2.txt
Normal file
Loading…
Reference in a new issue