fix: no more iterating through manipulated list

This commit is contained in:
Lunaresk 2021-12-04 11:42:54 +01:00
parent 9d404e0dae
commit 9a571a4ad7

View File

@ -44,7 +44,7 @@ def main() -> None:
result['date'] = str(date.today()) result['date'] = str(date.today())
TEMP.append(result) TEMP.append(result)
if TEMP: if TEMP:
for bought in TEMP: for bought in list(TEMP):
result = connection.send_scan(bought['user'], bought['items'], bought['date']) result = connection.send_scan(bought['user'], bought['items'], bought['date'])
TEMP.remove(bought) TEMP.remove(bought)
if result != True: if result != True: