Skip to content

Commit

Permalink
unit test fails to write logging information due to missing directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kwryankrattiger committed Jun 28, 2023
1 parent b44d051 commit a933be7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/spack/spack/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@

def _write_timer_json(pkg, timer, cache):
extra_attributes = {"name": pkg.name, "cache": cache}
with open(pkg.times_log_path, "w") as timelog:
timer.write_json(timelog, depth=-1, extra_attributes=extra_attributes)
try:
with open(pkg.times_log_path, "w") as timelog:
timer.write_json(timelog, depth=-1, extra_attributes=extra_attributes)
except:
tty.error("Could not write timing info...")
return


class InstallAction(object):
Expand Down

0 comments on commit a933be7

Please sign in to comment.