tserialize: handle case where proxy is None - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 992a634a77534c7e3cc35eac298f7235a8c731e2
DIR parent 30763a655563611ac1f662be8a023b61ffc107a3
HTML Author: ThomasV <thomasv@gitorious>
Date: Thu, 29 Jan 2015 11:30:42 +0100
serialize: handle case where proxy is None
Diffstat:
M lib/interface.py | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/lib/interface.py b/lib/interface.py
t@@ -39,6 +39,8 @@ proxy_modes = ['socks4', 'socks5', 'http']
import util
def serialize_proxy(p):
+ if type(p) != dict:
+ return None
return ':'.join([p.get('mode'),p.get('host'), p.get('port')])
def deserialize_proxy(s):