From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 9 Aug 2007 02:18:39 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions StorageReport.py Message-ID: <20070809021839.10447.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- conga/luci/site/luci/Extensions/StorageReport.py 2007/07/26 14:59:26 1.20.2.5 +++ conga/luci/site/luci/Extensions/StorageReport.py 2007/08/09 02:18:38 1.20.2.6 @@ -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)