Skip to content

Commit

Permalink
Mod: Update error message for SPICE.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Sep 25, 2023
1 parent b564240 commit cd87fc8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aac_metrics/functional/spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ def spice(

for fpath in fpaths:
info = {"t": "-", "r": "-", "w": "-", "x": "-"}
if osp.isfile(fpath):
if osp.islink(fpath):
info["t"] = "l"
elif osp.isfile(fpath):
info["t"] = "f"
elif osp.isdir(fpath):
info["t"] = "d"
Expand Down Expand Up @@ -261,7 +263,7 @@ def spice(
content = "\n".join(lines)
pylog.error(f"Content of '{fpath}':\n{content}")
except PermissionError:
pass
pylog.warning(f"Cannot open file '{fpath}'.")
else:
pylog.info(
f"Note: No temp file recorded. (found {stdout=} and {stderr=})"
Expand Down

0 comments on commit cd87fc8

Please sign in to comment.