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'
|
t += ' - Power Distribution'
|
||||||
fig1 = row.get_power_piechart(t)
|
fig1 = row.get_power_piechart(t)
|
||||||
|
|
||||||
if fig1:
|
if fig1 is None:
|
||||||
canvas = FigureCanvas(fig1)
|
return 0
|
||||||
|
|
||||||
canvas.print_figure('static/plots/' + imagename)
|
|
||||||
plt.close(fig1)
|
canvas = FigureCanvas(fig1)
|
||||||
fig1.clf()
|
|
||||||
gc.collect()
|
canvas.print_figure('static/plots/' + imagename)
|
||||||
|
plt.close(fig1)
|
||||||
|
fig1.clf()
|
||||||
|
gc.collect()
|
||||||
|
|
||||||
return imagename
|
return imagename
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user