Skip to content

Commit

Permalink
Update ppa/archive/gale.py
Browse files Browse the repository at this point in the history
Co-authored-by: Laure Thompson <[email protected]>
  • Loading branch information
rlskoeser and laurejt authored Oct 31, 2024
1 parent 4e90400 commit 8fe7241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppa/archive/gale.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def get_local_ocr(item_id):

# files are in stub directories; following conventions set in ppa-nlp
stub_dir = item_id[::3][1:]
ocr_dir = pathlib.Path(ocr_dir)
with (ocr_dir / stub_dir / f"{item_id}.json").open() as ocrfile:
ocr_path = pathlib.Path(ocr_dir, stub_dir, f"{item_id}.json")
with ocr_path.open() as ocrfile:

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
return json.load(ocrfile)


Expand Down

0 comments on commit 8fe7241

Please sign in to comment.