diff --git a/mmgen/main_addrgen.py b/mmgen/main_addrgen.py index 8cb21eea..bb537432 100755 --- a/mmgen/main_addrgen.py +++ b/mmgen/main_addrgen.py @@ -118,12 +118,8 @@ cmd_args = opt.opts.init(opts_data,add_opts=["b16"]) if opt.show_hash_presets: show_hash_presets() if opt.from_incog_hex or opt.from_incog_hidden: opt.from_incog = True -if len(cmd_args) == 1 and ( - opt.from_mnemonic - or opt.from_brain - or opt.from_seed - or opt.from_incog_hidden - ): +if len(cmd_args) == 1 and any([ + opt.from_mnemonic,opt.from_brain,opt.from_seed,opt.from_incog_hidden]): infile,addr_idx_arg = "",cmd_args[0] elif len(cmd_args) == 2: infile,addr_idx_arg = cmd_args diff --git a/mmgen/main_txsign.py b/mmgen/main_txsign.py index 4c74802b..3cb8272a 100755 --- a/mmgen/main_txsign.py +++ b/mmgen/main_txsign.py @@ -112,7 +112,7 @@ def get_seed_for_seed_id(seed_id,infiles,saved_seeds): while True: if infiles: seed = get_seed_retry(infiles.pop(0)) - elif opt.from_brain or opt.from_mnemonic or opt.from_seed or opt.from_incog: + elif any([opt.from_brain,opt.from_mnemonic,opt.from_seed,opt.from_incog]): qmsg("Need seed data for seed ID %s" % seed_id) seed = get_seed_retry("",seed_id) msg("User input produced seed ID %s" % make_chksum_8(seed)) diff --git a/mmgen/main_walletgen.py b/mmgen/main_walletgen.py index 0ee124c2..81b8a14c 100755 --- a/mmgen/main_walletgen.py +++ b/mmgen/main_walletgen.py @@ -151,8 +151,8 @@ if opt.from_brain and not opt.quiet: g.proj_name, *get_from_brain_opt_params()), "continue") -if infile or (opt.from_mnemonic or opt.from_brain - or opt.from_seed or opt.from_incog): +if infile or any([ + opt.from_mnemonic,opt.from_brain,opt.from_seed,opt.from_incog]): seed = get_seed_retry(infile) qmsg("") else: diff --git a/mmgen/opts.py b/mmgen/opts.py index 39110348..eb2fca9a 100755 --- a/mmgen/opts.py +++ b/mmgen/opts.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -opts.py: MMGen-specific options processing after general processing by share.Opts +opts.py: MMGen-specific options processing after generic processing by share.Opts """ import sys @@ -32,10 +32,10 @@ def usage(): def print_version_info(): Msg(""" -{pnu} version {g.version}. Part of the {g.proj_name} suite, a Bitcoin +{progname_uc} version {g.version}. Part of the {g.proj_name} suite, a Bitcoin cold-storage solution for the command line. Copyright (C) {g.Cdates} by {g.author} {g.email} -""".format(g=g,pnu=g.prog_name.upper()).strip()) +""".format(g=g,progname_uc=g.prog_name.upper()).strip()) def warn_incompatible_opts(incompat_list): bad = [k for k in opt.__dict__ if opt.__dict__[k] and k in incompat_list] diff --git a/test/test.py b/test/test.py index 08590fa5..6dd9f2d0 100755 --- a/test/test.py +++ b/test/test.py @@ -682,9 +682,11 @@ class MMGenTestSuite(object): def refwalletgen(self,name): label = cfg['wallet_label'] - args = ["-q","-d",cfg['tmpdir'],"-p1","-r10", + args = ["-d",cfg['tmpdir'],"-p1","-r10", "-b"+cfg['bw_hashparams'],"-L",label] t = MMGenExpect(name,"mmgen-walletgen", args) + t.license() + t.expect("Type uppercase 'YES' to confirm: ","YES\n") t.expect("passphrase: ",cfg['bw_passwd']+"\n") t.usr_rand(10) t.passphrase_new("new MMGen wallet",cfg['wpasswd']) diff --git a/test/tooltest.py b/test/tooltest.py index 03e5f453..2caec817 100755 --- a/test/tooltest.py +++ b/test/tooltest.py @@ -79,7 +79,6 @@ opts_data = { 'usage':"[options] [command]", 'options': """ -h, --help Print this help message --d, --debug-scripts Turn on debugging output in executed scripts -l, --list-cmds List and describe the tests and commands in the test suite -s, --system Test scripts and modules installed on system rather than those in the repo root