tfix bug #787 - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 3bbd3685d80117b70aa683f52f7fc13523cfc321
DIR parent 1fa51e6b7c1448550376ab4dc8372378863e7bd6
HTML Author: ThomasV <thomasv@gitorious>
Date: Sun, 7 Sep 2014 22:26:07 +0200
fix bug #787
Diffstat:
M plugins/labels.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
DIR diff --git a/plugins/labels.py b/plugins/labels.py
t@@ -177,8 +177,17 @@ class Plugin(BasePlugin):
try:
bundle = {"labels": {}}
for key, value in self.wallet.labels.iteritems():
- encoded = self.encode(key)
- bundle["labels"][encoded] = self.encode(value)
+ try:
+ encoded_key = self.encode(key)
+ except:
+ print_error('cannot encode', encoded_key)
+ continue
+ try:
+ encoded_value = self.encode(value)
+ except:
+ print_error('cannot encode', encoded_value)
+ continue
+ bundle["labels"][encoded_key] = encoded_value
params = json.dumps(bundle)
connection = httplib.HTTPConnection(self.target_host)