[+] Corrected exception handling syntax

This commit is contained in:
Charles Le Maux 2024-09-10 01:06:56 +02:00
parent 8a282012e3
commit 2fe31596c0

2
app.py
View File

@ -162,7 +162,7 @@ def upload():
case 1: case 1:
return generic_response_maker(http.HTTPStatus.NOT_ACCEPTABLE, "No file(s) were uploaded.") return generic_response_maker(http.HTTPStatus.NOT_ACCEPTABLE, "No file(s) were uploaded.")
except FileNotFoundError as e: except FileNotFoundError:
return generic_response_maker(http.HTTPStatus.CONFLICT, "Please launch the server at least once.") return generic_response_maker(http.HTTPStatus.CONFLICT, "Please launch the server at least once.")
except KeyError as e: except KeyError as e: