From 551d854fbd565377a22adcda230f9ac91e2a1aef Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Thu, 22 Oct 2015 15:22:08 -0700 Subject: [PATCH] fix stock formatting --- plugins/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/stock.py b/plugins/stock.py index 5756448..45cd44a 100644 --- a/plugins/stock.py +++ b/plugins/stock.py @@ -28,7 +28,7 @@ def stock(inp): elif price > ask: price = ask change = price - open_price - quote['LastTradePriceOnly'] = price + quote['LastTradePriceOnly'] = "%.2f" % price quote['Change'] = ("+%.2f" % change) if change >= 0 else change if change < 0: @@ -38,7 +38,7 @@ def stock(inp): quote['PercentChange'] = 100 * change / (price - change) - ret = "%(Name)s - %(LastTradePriceOnly).2f " \ + ret = "%(Name)s - %(LastTradePriceOnly)s " \ "\x03%(color)s%(Change)s (%(PercentChange).2f%%)\x03 " \ "Day Range: %(DaysRange)s " \ "MCAP: %(MarketCapitalization)s" % quote