fix: return scanned if server is unreachable
This commit is contained in:
parent
bae97263ed
commit
60661ce2ec
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user