Skip to content

Commit

Permalink
Policies: Fix log message when pfn2lfn is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio committed Dec 5, 2024
1 parent 3d5cbf5 commit 43d6f06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rucio/rse/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ def __init__(self, vo: str = 'def'):
logger = logging.getLogger(__name__)

try:
# Use the function defined in the policy package if it's configured so
algorithm_name = config.config_get('policy', self._algorithm_type)
except (NoOptionError, NoSectionError, RuntimeError):
# Don't use a function from the policy package. Use one defined in this class according to vo
logger.debug("PFN2LFN function will not be fetched from the policy package")
logger.debug("PFN2LFN: no algorithm specified in the config.")
if super()._supports(self._algorithm_type, vo):
algorithm_name = vo
else:
algorithm_name = "def"
logger.debug("PFN2LFN: Falling back to %s algorithm.", 'default' if algorithm_name == 'def' else algorithm_name)

self.parser = self.get_parser(algorithm_name)

Expand Down

0 comments on commit 43d6f06

Please sign in to comment.