Skip to content

Commit

Permalink
setup_logger: check module_name is not None prior to regex match
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio committed Mar 25, 2024
1 parent d5d3d67 commit 4d2808d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rucio/common/utils.py
Expand Up @@ -1786,10 +1786,10 @@ def setup_logger(
:param verbose: verbose option set in bin/rucio
'''
# helper method for cfg check
def _force_cfg_log_level(cfg_option):
def _force_cfg_log_level(cfg_option: str) -> bool:
cfg_forced_modules = config_get('logging', cfg_option, raise_exception=False, default=None, clean_cached=True,
check_config_table=False)
if cfg_forced_modules:
if cfg_forced_modules and module_name is not None:
if re.match(str(cfg_forced_modules), module_name):
return True
return False
Expand Down

0 comments on commit 4d2808d

Please sign in to comment.