globalvars.py: required_opts -> init_opts
This commit is contained in:
parent
0ac28869b3
commit
91156f6847
4 changed files with 6 additions and 11 deletions
|
|
@ -168,13 +168,8 @@ class GlobalContext(Lockable):
|
|||
'daemon_data_dir','force_256_color','regtest','coin','bob','alice',
|
||||
'accept_defaults','token','ignore_daemon_version','daemon_id','http_timeout',
|
||||
)
|
||||
# opts initialized to None by opts.init() if not set by user
|
||||
required_opts = (
|
||||
'quiet','verbose','debug','outdir','echo_passphrase','passwd_file','stdout',
|
||||
'show_hash_presets','label','keep_passphrase','keep_hash_preset','yes',
|
||||
'brain_params','b16','usr_randchars','coin','bob','alice',
|
||||
'hidden_incog_input_params','in_fmt','hash_preset','seed_len',
|
||||
)
|
||||
# opts not in common_opts but required to be set during opts initialization
|
||||
init_opts = ('show_hash_presets','yes','verbose')
|
||||
incompatible_opts = (
|
||||
('help','longhelp'),
|
||||
('bob','alice'),
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ def init(opts_data=None,add_opts=None,init_opts=None,opt_filter=None,parse_only=
|
|||
+ po.skipped_opts
|
||||
+ tuple(add_opts or [])
|
||||
+ tuple(init_opts or [])
|
||||
+ g.required_opts
|
||||
+ g.init_opts
|
||||
+ g.common_opts ):
|
||||
setattr(opt,o,po.user_opts[o] if o in po.user_opts else None)
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ if cmd_args == ['show_common_opts_diff']:
|
|||
for k in (
|
||||
'foo', # added opt
|
||||
'print_checksum', # sets 'quiet'
|
||||
'quiet','verbose', # required_opts, incompatible_opts
|
||||
'quiet','verbose', # init_opts, incompatible_opts
|
||||
'fee_estimate_mode', # autoset_opts
|
||||
'passwd_file', # infile_opts - check_infile()
|
||||
'outdir', # check_outdir()
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ class TestSuiteOpts(TestSuiteBase):
|
|||
(
|
||||
('opt.foo', 'None'), # added opt
|
||||
('opt.print_checksum', 'None'), # sets 'quiet'
|
||||
('opt.quiet', 'False'), # required_opts, incompatible_opts
|
||||
('opt.verbose', 'None'), # required_opts, incompatible_opts
|
||||
('opt.quiet', 'False'), # init_opts, incompatible_opts
|
||||
('opt.verbose', 'None'), # init_opts, incompatible_opts
|
||||
('opt.fee_estimate_mode', 'conservative'), # autoset_opts
|
||||
('opt.passwd_file', 'None'), # infile_opts - check_infile()
|
||||
('opt.outdir', 'None'), # check_outdir()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue