gnome-applets r10924 - trunk/invest-applet/invest
- From: callum svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r10924 - trunk/invest-applet/invest
- Date: Wed, 20 Aug 2008 19:56:36 +0000 (UTC)
Author: callum
Date: Wed Aug 20 19:56:36 2008
New Revision: 10924
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=10924&view=rev
Log:
Fix a division by zero in the invest applet. Bug 548517
Modified:
trunk/invest-applet/invest/quotes.py
Modified: trunk/invest-applet/invest/quotes.py
==============================================================================
--- trunk/invest-applet/invest/quotes.py (original)
+++ trunk/invest-applet/invest/quotes.py Wed Aug 20 19:56:36 2008
@@ -179,8 +179,12 @@
image_retriever = invest.chart.ImageRetriever(url)
image_retriever.connect("completed", self.set_pb_callback, row)
image_retriever.start()
+
+ if self.simple_quotes_count > 0:
+ self.avg_simple_quotes_change = simple_quotes_change/float(self.simple_quotes_count)
+ else:
+ self.avg_simple_quotes_change = 0
- self.avg_simple_quotes_change = simple_quotes_change/float(self.simple_quotes_count)
if self.avg_simple_quotes_change != 0:
simple_quotes_change_sign = self.avg_simple_quotes_change / abs(self.avg_simple_quotes_change)
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]