From 9702c6cba837270a0bbf38ce7a63bde262fc4832 Mon Sep 17 00:00:00 2001 From: Jonathan Lundy Date: Tue, 23 Jun 2020 11:01:02 -0600 Subject: [PATCH] fix path --- utils/registry/rpsl_scan/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/registry/rpsl_scan/__init__.py b/utils/registry/rpsl_scan/__init__.py index 13743e6e3..b38585ecf 100644 --- a/utils/registry/rpsl_scan/__init__.py +++ b/utils/registry/rpsl_scan/__init__.py @@ -70,7 +70,7 @@ def run(args: List[str], env: Dict[str, str]) -> int: for schema in schema_set.schemas: schemas[schema.ref] = schema - def file_gen(): + def file_gen(path): if opts.scan_dir is not None: path = os.path.join(env.get("WORKING_DIR"), opts.scan_dir) elif opts.scan_file is not None: @@ -81,11 +81,11 @@ def run(args: List[str], env: Dict[str, str]) -> int: if opts.add_index: print("Add scanned items to lookup index...", file=sys.stderr) - for dom in file_gen(): + for dom in file_gen(path): key, value = dom.index lookups[key] = value - for dom in file_gen(): + for dom in file_gen(path): s = schemas.get(dom.rel) if s is None: print(f"{dom.src} schema not found for {dom.rel}")