diff --git a/mmgen/altcoin.py b/mmgen/altcoin.py index 63cd2226..ca5b4d7e 100755 --- a/mmgen/altcoin.py +++ b/mmgen/altcoin.py @@ -625,15 +625,14 @@ class CoinInfo(object): return None try: - assert ( - cls.external_tests_blacklist[addr_type][tool] == True - or coin in cls.external_tests_blacklist[addr_type][tool] ) + bl = cls.external_tests_blacklist[addr_type][tool] except: pass else: - if verbose: - msg(f'Tool {tool!r} blacklisted for coin {coin}, addr_type {addr_type!r}') - return None + if bl == True or coin in bl: + if verbose: + msg(f'Tool {tool!r} blacklisted for coin {coin}, addr_type {addr_type!r}') + return None if toolname: # skip whitelists return tool diff --git a/mmgen/main_wallet.py b/mmgen/main_wallet.py index 4fd17329..7682b65a 100755 --- a/mmgen/main_wallet.py +++ b/mmgen/main_wallet.py @@ -229,21 +229,17 @@ if invoked_as == 'passchg' and ss_in.infile.dirname == g.data_dir: shred_file( ss_in.infile.name, verbose = opt.verbose ) +elif ( + invoked_as == 'gen' + and not opt.outdir + and not opt.stdout + and not find_file_in_dir( MMGenWallet, g.data_dir ) + and keypress_confirm( + 'Make this wallet your default and move it to the data directory?', + default_yes = True ) ): + ss_out.write_to_file(outdir=g.data_dir) else: - try: - assert invoked_as == 'gen', 'dw' - assert not opt.outdir, 'dw' - assert not opt.stdout, 'dw' - assert not find_file_in_dir( MMGenWallet, g.data_dir ), 'dw' - assert keypress_confirm( - 'Make this wallet your default and move it to the data directory?', - default_yes = True ), 'dw' - except Exception as e: - if str(e) != 'dw': - raise - ss_out.write_to_file() - else: - ss_out.write_to_file(outdir=g.data_dir) + ss_out.write_to_file() if invoked_as == 'passchg': if ss_out.ssdata.passwd == ss_in.ssdata.passwd: