[minor] catch matplotlib write error
This commit is contained in:
parent
00d2d0119c
commit
08b12aeb9d
@ -402,7 +402,10 @@ class SurveillanceBot(object):
|
||||
for ax in fig.axes:
|
||||
ax.grid(True, alpha=0.1)
|
||||
for fnout in fnames_out:
|
||||
fig.savefig(fnout, dpi=150., bbox_inches='tight')
|
||||
try:
|
||||
fig.savefig(fnout, dpi=150., bbox_inches='tight')
|
||||
except IOError as e:
|
||||
print('WARNING: Could not save figure with IO error. Disk quota exceeded?\nError message: {e}')
|
||||
# if needed save figure as virtual object (e.g. for mailing)
|
||||
if save_bytes:
|
||||
fnames_out[-1].seek(0)
|
||||
|
Loading…
Reference in New Issue
Block a user