Skip to content

Commit

Permalink
Fix bandit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
goodsong81 committed Jun 4, 2024
1 parent 554d46e commit 4c2c290
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openvino_xai/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def has_xai(model: ov.Model) -> bool:
return False


# Not a part of product
def retrieve_otx_model(data_dir: str | Path, model_name: str, dir_url=None) -> None:
destination_folder = Path(data_dir) / "otx_models"
os.makedirs(destination_folder, exist_ok=True)
Expand All @@ -50,7 +51,7 @@ def retrieve_otx_model(data_dir: str | Path, model_name: str, dir_url=None) -> N

for post_fix in ["xml", "bin"]:
if not os.path.isfile(os.path.join(destination_folder, model_name + f".{post_fix}")):
urlretrieve(
urlretrieve( # nosec B310
f"{dir_url}/{snapshot_file}.{post_fix}",
f"{destination_folder}/{model_name}.{post_fix}",
)
Expand Down

0 comments on commit 4c2c290

Please sign in to comment.