fix: return scanned if server is unreachable

This commit is contained in:
Lunaresk 2021-12-03 15:36:08 +01:00
parent bae97263ed
commit 60661ce2ec
2 changed files with 2 additions and 2 deletions

View File

@ -42,4 +42,4 @@ def send_scan(login: str, scanned: dict[int: int], date:str = None):
return True if response.status_code == 201 else response.json return True if response.status_code == 201 else response.json
except Exception as e: except Exception as e:
LOGGER.exception(e) LOGGER.exception(e)
return False return infos

View File

@ -72,7 +72,7 @@ def scanning() -> list:
try: try:
scanned.remove(scan) scanned.remove(scan)
except ValueError as e: except ValueError as e:
pass LOGGER.exception(e)
case _: case _:
scanned.append(scan) scanned.append(scan)
return scanned return scanned