tCheck if value has 'is_nan' before calling it - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 1451c66a8f65e87555fce8a7111ddef898381598
DIR parent 2bde6867526f5c41b553d3aeff561edf3c826d4e
HTML Author: Johann Bauer <bauerj@bauerj.eu>
Date: Mon, 5 Mar 2018 23:07:52 +0100
Check if value has 'is_nan' before calling it
Fixes: #4034
Diffstat:
M lib/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/lib/util.py b/lib/util.py
t@@ -113,7 +113,7 @@ class Fiat(object):
return 'Fiat(%s)'% self.__str__()
def __str__(self):
- if self.value.is_nan():
+ if hasattr(self.value, 'is_nan') and self.value.is_nan():
return _('No Data')
else:
return "{:.2f}".format(self.value) + ' ' + self.ccy