mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Catch more specific exception
This commit is contained in:
parent
25b64e353c
commit
3639ab9260
@ -203,7 +203,7 @@ class ApiServersServerBackupsBackupIndexHandler(BaseApiHandler):
|
|||||||
except JobLookupError as e:
|
except JobLookupError as e:
|
||||||
logger.info("No active tasks found for server: {e}")
|
logger.info("No active tasks found for server: {e}")
|
||||||
self.controller.remove_server(server_id, True)
|
self.controller.remove_server(server_id, True)
|
||||||
except Exception as e:
|
except (FileNotFoundError, NotADirectoryError) as e:
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400, {"status": "error", "error": f"NO BACKUP FOUND {e}"}
|
400, {"status": "error", "error": f"NO BACKUP FOUND {e}"}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user