From 9fa4861e5e06392e1f38bf18a9d2bf4d5677ec08 Mon Sep 17 00:00:00 2001 From: harshadkhetpal Date: Mon, 23 Mar 2026 21:31:47 +0530 Subject: [PATCH 1/3] fix: replace bare except with except Exception in autoconf/main.py --- src/autoconf/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 3a05e26a4c03312e376e29708a318f8f7f116cbe Mon Sep 17 00:00:00 2001 From: harshadkhetpal Date: Mon, 23 Mar 2026 21:31:52 +0530 Subject: [PATCH 2/3] fix: replace bare except with except Exception in common/utils/jobs.py --- src/common/utils/jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From a30125e094731ce5560f33e37f3febf43844fea1 Mon Sep 17 00:00:00 2001 From: harshadkhetpal Date: Mon, 23 Mar 2026 21:31:57 +0530 Subject: [PATCH 3/3] fix: replace bare except with except Exception in common/gen/save_config.py --- src/common/gen/save_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)