git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
c53c3f2
)
fix type for settings in configuration file
author
thomasv
<thomasv@gitorious>
Fri, 12 Oct 2012 09:26:30 +0000 (11:26 +0200)
committer
thomasv
<thomasv@gitorious>
Fri, 12 Oct 2012 09:26:30 +0000 (11:26 +0200)
lib/simple_config.py
patch
|
blob
|
history
diff --git
a/lib/simple_config.py
b/lib/simple_config.py
index
014726d
..
f2ba068
100644
(file)
--- 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