refactor: log swallowed exceptions across src/
Replace silent swallow-excepts (pass/return/continue) with logger.warning recording the caught error, preserving behaviour.
This commit is contained in:
49 files changed
+1004
-363
No files matched your search
@@ -8,6 +8,8 @@ Each plugin module exposes a PLUGIN variable pointing to its class.
|
||||
import importlib
|
||||
import pkgutil
|
||||
|
||||
from fabric.utils import logger
|
||||
|
||||
__all__ = []
|
||||
|
||||
for module_info in pkgutil.iter_modules(__path__):
|
||||
@@ -20,5 +22,7 @@ for module_info in pkgutil.iter_modules(__path__):
|
||||
if plugin_class is not None:
|
||||
globals()[module_name] = plugin_class
|
||||
__all__.append(module_name)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"[__init__] module = importlib.import_module(f'(__name__).(module_nam... failed: {e}"
|
||||
)
|
||||
Reference in new issue
Block a user