diff --git a/src/autoconf/main.py b/src/autoconf/main.py index b34f1e0e01..31f49d7296 100644 --- a/src/autoconf/main.py +++ b/src/autoconf/main.py @@ -82,7 +82,7 @@ def exit_handler(signum, frame): Path(sep, "var", "tmp", "bunkerweb", "autoconf.healthy").write_text("ok") LOGGER.info("Processing events ...") controller.process_events() -except: +except Exception: LOGGER.error(f"Exception while running autoconf :\n{format_exc()}") sys_exit(1) finally: diff --git a/src/common/gen/save_config.py b/src/common/gen/save_config.py index 1e77f08a7e..a93e54113d 100644 --- a/src/common/gen/save_config.py +++ b/src/common/gen/save_config.py @@ -248,7 +248,7 @@ LOGGER.error(f"An error occurred when setting the changes to checked in the database : {ret}") except SystemExit as e: sys_exit(e.code) - except: + except Exception: LOGGER.error(f"Exception while executing config saver : {format_exc()}") sys_exit(1) diff --git a/src/common/utils/jobs.py b/src/common/utils/jobs.py index 9096731072..5ec9c91d31 100644 --- a/src/common/utils/jobs.py +++ b/src/common/utils/jobs.py @@ -260,7 +260,7 @@ def cache_file( if ret and isinstance(file_cache, Path) and delete_file and file_cache != cache_path: file_cache.unlink(missing_ok=True) - except: + except Exception: return False, f"exception :\n{format_exc()}" return ret, err @@ -296,7 +296,7 @@ def del_cache(self, name: Union[str, Path], *, job_name: str = "", service_id: s try: self.db.delete_job_cache(name, job_name=job_name, service_id=service_id) # type: ignore - except: + except Exception: return False, f"exception :\n{format_exc()}" return ret, err