returning 0 is makeplot gives no image
This commit is contained in:
@@ -1887,13 +1887,16 @@ def handle_makeplot(f1, f2, t, hrdata, plotnr, imagename,
|
||||
t += ' - Power Distribution'
|
||||
fig1 = row.get_power_piechart(t)
|
||||
|
||||
if fig1:
|
||||
canvas = FigureCanvas(fig1)
|
||||
if fig1 is None:
|
||||
return 0
|
||||
|
||||
canvas.print_figure('static/plots/' + imagename)
|
||||
plt.close(fig1)
|
||||
fig1.clf()
|
||||
gc.collect()
|
||||
|
||||
canvas = FigureCanvas(fig1)
|
||||
|
||||
canvas.print_figure('static/plots/' + imagename)
|
||||
plt.close(fig1)
|
||||
fig1.clf()
|
||||
gc.collect()
|
||||
|
||||
return imagename
|
||||
|
||||
|
||||
Reference in New Issue
Block a user