command line option for portable wallets
This commit is contained in:
parent
ba39f8bec0
commit
bd96815eb3
1
electrum
1
electrum
@ -137,6 +137,7 @@ def arg_parser():
|
|||||||
parser.add_option("-s", "--server", dest="server", default=None, help="set server host:port:protocol, where protocol is t or h")
|
parser.add_option("-s", "--server", dest="server", default=None, help="set server host:port:protocol, where protocol is t or h")
|
||||||
parser.add_option("-p", "--proxy", dest="proxy", default=None, help="set proxy [type:]host[:port], where type is socks4,socks5 or http")
|
parser.add_option("-p", "--proxy", dest="proxy", default=None, help="set proxy [type:]host[:port], where type is socks4,socks5 or http")
|
||||||
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="show debugging information")
|
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="show debugging information")
|
||||||
|
parser.add_option("-P", "--portable", action="store_true", dest="portable", default=False, help="portable wallet")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,12 +17,14 @@ a SimpleConfig instance then reads the wallet file.
|
|||||||
|
|
||||||
# system conf, readonly
|
# system conf, readonly
|
||||||
self.system_config = {}
|
self.system_config = {}
|
||||||
self.read_system_config()
|
if options.get('portable') == False:
|
||||||
|
self.read_system_config()
|
||||||
|
|
||||||
# user conf, writeable
|
# user conf, writeable
|
||||||
self.user_dir = user_dir()
|
self.user_dir = user_dir()
|
||||||
self.user_config = {}
|
self.user_config = {}
|
||||||
self.read_user_config()
|
if options.get('portable') == False:
|
||||||
|
self.read_user_config()
|
||||||
|
|
||||||
# command-line options
|
# command-line options
|
||||||
self.options_config = options
|
self.options_config = options
|
||||||
@ -34,6 +36,9 @@ a SimpleConfig instance then reads the wallet file.
|
|||||||
if self.path:
|
if self.path:
|
||||||
self.read_wallet_config(self.path)
|
self.read_wallet_config(self.path)
|
||||||
|
|
||||||
|
# portable wallet: use the same directory for wallet and headers file
|
||||||
|
if options.get('portable'):
|
||||||
|
self.wallet_config['blockchain_headers_path'] = os.path.dirname(self.path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user