eval arg passed to setconfig, to avoid storing boolean as string
This commit is contained in:
5
electrum
5
electrum
@@ -21,6 +21,7 @@ import json
|
|||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import ast
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
@@ -454,6 +455,10 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
elif cmd.name == 'setconfig':
|
elif cmd.name == 'setconfig':
|
||||||
key, value = args[1:3]
|
key, value = args[1:3]
|
||||||
|
try:
|
||||||
|
value = ast.literal_eval(value)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
config.set_key(key, value, True)
|
config.set_key(key, value, True)
|
||||||
print_msg(True)
|
print_msg(True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user