electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 5e76b8caab28fb353e0e42b175f4a1d94fa09607
parent c53c3f21955fd83e45d1f08c64341b0cea9f6c5a
Author: thomasv <thomasv@gitorious>
Date:   Fri, 12 Oct 2012 11:26:30 +0200

fix type for settings in configuration file

Diffstat:
Mlib/simple_config.py | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/simple_config.py b/lib/simple_config.py @@ -72,12 +72,19 @@ class SimpleConfig: # 2. configuration file overrides wallet file elif self.common_config.has_key(key): out = self.common_config.get(key) - + + # 3. use the wallet file config else: out = self.wallet_config.get(key) if out is None and default is not None: out = default + + # try to fix the type + if default is not None and type(out) != type(default): + import ast + out = ast.literal_eval(out) + return out