commit f7c3b2f06732bf2bfa1bd085d60b739b8505942b
parent ae1f1ee8ea4f79a0454e9f07adc9a543818916cc
Author: thomasv <thomasv@gitorious>
Date: Mon, 19 Nov 2012 14:05:42 +0100
pop all options that are None before passing them to SimpleConfig
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/electrum b/electrum
@@ -146,10 +146,13 @@ if __name__ == '__main__':
# config is an object passed to the various constructors (wallet, interface, gui)
if 'ANDROID_DATA' in os.environ:
- config = SimpleConfig({'wallet_path':"/sdcard/electrum.dat", 'blockchain_headers_path':'/sdcard', 'gui':'android'})
+ config_options = {'wallet_path':"/sdcard/electrum.dat", 'blockchain_headers_path':'/sdcard', 'gui':'android'}
else:
- config = SimpleConfig(eval(str(options)))
+ config_options = eval(str(options))
+ for k, v in config_options.items():
+ if v is None: config_options.pop(k)
+ config = SimpleConfig(config_options)
wallet = Wallet(config)
if len(args)==0: