Skip to content

Commit

Permalink
Make autoload default. It can be used instead to suppress autoload.
Browse files Browse the repository at this point in the history
  • Loading branch information
netsettler committed Sep 29, 2023
1 parent 20e6153 commit d868a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dcicutils/license_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d868a05

Please sign in to comment.