File pybootchartgui-r124.diff of Package bootchart

diff -ru pybootchartgui-r124.orig/pybootchartgui/draw.py pybootchartgui-r124/pybootchartgui/draw.py
--- pybootchartgui-r124.orig/pybootchartgui/draw.py	2009-04-14 22:42:11.000000000 +0200
+++ pybootchartgui-r124/pybootchartgui/draw.py	2009-05-19 15:32:54.000000000 +0200
@@ -164,7 +164,8 @@
 		return x, y
 
 	xscale = float(chart_bounds[2]) / max(x for (x,y) in data)
-	yscale = float(chart_bounds[3]) / max(y for (x,y) in data)
+	maxy = max(1, max(y for (x,y) in data))
+	yscale = float(chart_bounds[3]) / maxy
     
 	first = transform_point_coords(data[0], x_shift, 0, xscale, yscale, chart_bounds[0], chart_bounds[1])
 	last = transform_point_coords(data[-1], x_shift, 0, xscale, yscale, chart_bounds[0], chart_bounds[1])
openSUSE Build Service is sponsored by