Skip to content

Commit

Permalink
Make directory for plot_bias if it doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed May 11, 2020
1 parent da91151 commit 9ba1162
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flarestack/core/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,12 @@ def plot_bias(self):

savepath = os.path.join(self.plot_dir, "bias_" + param + ".pdf")
logging.info("Saving bias plot to {0}".format(savepath))

try:
os.makedirs(os.path.dirname(savepath))
except OSError:
pass

plt.savefig(savepath)
plt.close()

Expand Down

0 comments on commit 9ba1162

Please sign in to comment.