[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r23463: {arm} fix: crashing issue manifesting on python 2.7 due to float v (arm/trunk/src/interface/graphing)
Author: atagar
Date: 2010-10-08 16:18:26 +0000 (Fri, 08 Oct 2010)
New Revision: 23463
Modified:
arm/trunk/src/interface/graphing/graphPanel.py
Log:
fix: crashing issue manifesting on python 2.7 due to float values being used in the bandwidth graph (caught by tomb)
Modified: arm/trunk/src/interface/graphing/graphPanel.py
===================================================================
--- arm/trunk/src/interface/graphing/graphPanel.py 2010-10-08 15:17:14 UTC (rev 23462)
+++ arm/trunk/src/interface/graphing/graphPanel.py 2010-10-08 16:18:26 UTC (rev 23463)
@@ -340,11 +340,11 @@
# creates bar graph (both primary and secondary)
for col in range(graphCol):
- colCount = param.primaryCounts[self.updateInterval][col + 1] - primaryMinBound
+ colCount = int(param.primaryCounts[self.updateInterval][col + 1]) - primaryMinBound
colHeight = min(self.graphHeight, self.graphHeight * colCount / (max(1, primaryMaxBound) - primaryMinBound))
for row in range(colHeight): self.addstr(self.graphHeight + 1 - row, col + 5, " ", curses.A_STANDOUT | primaryColor)
- colCount = param.secondaryCounts[self.updateInterval][col + 1] - secondaryMinBound
+ colCount = int(param.secondaryCounts[self.updateInterval][col + 1]) - secondaryMinBound
colHeight = min(self.graphHeight, self.graphHeight * colCount / (max(1, secondaryMaxBound) - secondaryMinBound))
for row in range(colHeight): self.addstr(self.graphHeight + 1 - row, col + graphCol + 10, " ", curses.A_STANDOUT | secondaryColor)