Skip to content

Commit

Permalink
Verbose permission error
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Jul 11, 2023
1 parent 7374dc2 commit 047c2ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/fprime/fpp/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ def run_fprime_visualize(

viz_cache = Path(parsed.working_dir).resolve()
xml_cache = (viz_cache / "xml").resolve()
xml_cache.mkdir(parents=True, exist_ok=True)
try:
xml_cache.mkdir(parents=True, exist_ok=True)
except PermissionError:
raise PermissionError(
f"Unable to write to {viz_cache.resolve()}. Use --working-dir to set a different location."
)

# Run fpp-to-xml
FppUtility("fpp-to-xml").execute(
Expand Down

0 comments on commit 047c2ac

Please sign in to comment.