Skip to contentSkip to conversation

conga/luci/site/luci/Extensions StorageReport.py

Cluster-devel [email protected] 1 participant 1 message Aug 9, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-08-09 02:18:39

Modified files:
luci/site/luci/Extensions: StorageReport.py

Log message:

	Fix 250834

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.5&r2=1.20.2.6

luci/site/luci/Extensions/StorageReport.py +1 -1
@@ -2060,7 +2060,7 @@
     length_in_bytes = 0
     for t in mapper_data['sources']:
         length_in_bytes += int(t['props']['size']['value'])
-    ppb = (length * 1.0) / length_in_bytes  # pixels per byte
+    ppb = (length * 1.0) / max(0.00001, length_in_bytes)  # pixels per byte
     lower_cyl['offset'] = int(lower_cyl['offset'] * ppb)
     for d in lower_cyl['cyls']:
         d['beg'] = int(d['beg'] * ppb)