From d868a0518c67c0214b71e88834bd274d9da7d476 Mon Sep 17 00:00:00 2001 From: Kent Pitman Date: Fri, 29 Sep 2023 13:08:03 -0400 Subject: [PATCH] Make autoload default. It can be used instead to suppress autoload. --- dcicutils/license_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dcicutils/license_utils.py b/dcicutils/license_utils.py index ce01a5c80..ab9aa9d76 100644 --- a/dcicutils/license_utils.py +++ b/dcicutils/license_utils.py @@ -745,11 +745,11 @@ def find_checker(cls, checker_name: str) -> Optional[Type[LicenseChecker]]: return cls.REGISTRY.get(checker_name, None) @classmethod - def lookup_checker(cls, checker_name: str, autoload: bool = False, + def lookup_checker(cls, checker_name: str, autoload: bool = True, policy_dir: Optional[str] = None) -> Type[LicenseChecker]: result: Optional[Type[LicenseChecker]] = cls.find_checker(checker_name) if result is None: - if autoload or policy_dir: + if autoload: policy_dir = policy_dir or LicenseOptions.POLICY_DIR or POLICY_DIR PRINT(f"Looking for custom policy {checker_name} in {policy_dir} ...") result = find_or_create_license_class(policy_name=checker_name,