teval arg passed to setconfig, to avoid storing boolean as string - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 271dfeb245fd0ba560e9d6c3593b57629972b88e
DIR parent da6f292dd53d7f13a58522a9ad05dc50c92031bc
HTML Author: ThomasV <thomasv@gitorious>
Date: Mon, 3 Mar 2014 12:29:10 +0100
eval arg passed to setconfig, to avoid storing boolean as string
Diffstat:
M electrum | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
---
DIR diff --git a/electrum b/electrum
t@@ -21,6 +21,7 @@ import json
import optparse
import os
import re
+import ast
import sys
import time
import traceback
t@@ -454,6 +455,10 @@ if __name__ == '__main__':
elif cmd.name == 'setconfig':
key, value = args[1:3]
+ try:
+ value = ast.literal_eval(value)
+ except:
+ pass
config.set_key(key, value, True)
print_msg(True)