Skip to content

Commit

Permalink
Skip non-files in batch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed May 7, 2023
1 parent 9c3603a commit 8c27000
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ogc/na/ingest_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ def process(input_files: str | Path | Sequence[str | Path],
while remaining_fn:
fn = str(remaining_fn.popleft())

if not fn or not os.path.isfile():
continue

if re.match(r'.*\.ya?ml$', fn):
# Context file found, try to find corresponding JSON/JSON-LD file(s)
logger.info('Potential YAML context file found: %s', fn)
Expand Down

0 comments on commit 8c27000

Please sign in to comment.