git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
c71af98
)
point of sale plugin set amount to None if the exchanger fails
author
Michael Wozniak
<github@koh.ms>
Sat, 16 Nov 2013 15:09:48 +0000 (10:09 -0500)
committer
Michael Wozniak
<github@koh.ms>
Sat, 16 Nov 2013 15:09:48 +0000 (10:09 -0500)
plugins/pointofsale.py
patch
|
blob
|
history
diff --git
a/plugins/pointofsale.py
b/plugins/pointofsale.py
index
6e66142
..
f08bb1c
100644
(file)
--- a/
plugins/pointofsale.py
+++ b/
plugins/pointofsale.py
@@
-65,7
+65,10
@@
class QR_Window(QWidget):
amount_text = ''
if amount:
if currency:
- self.amount = Decimal(amount) / self.exchanger.exchange(1, currency) if currency else amount
+ try:
+ self.amount = Decimal(amount) / self.exchanger.exchange(1, currency) if currency else amount
+ except Exception:
+ self.amount = None
else:
self.amount = Decimal(amount)
self.amount = self.amount.quantize(Decimal('1.0000'))