diff --git a/mmgen/main_wallet.py b/mmgen/main_wallet.py index 5bbfed94..3a91b18b 100755 --- a/mmgen/main_wallet.py +++ b/mmgen/main_wallet.py @@ -75,12 +75,12 @@ elif invoked_as == 'seedsplit': opts_data = { 'filter_codes': { # Write In-fmt Out-fmt Keep-pass Force-update Master-share passwd-file-New-only - 'chk': ['-', 'i'], - 'conv': ['-', 'w', 'i', 'o', 'k', 'n'], - 'gen': ['-', 'w', 'o'], - 'passchg': ['-', 'w', 'i', 'k', 'f', 'n'], - 'seedsplit': ['-', 'w', 'i', 'o', 'm', 'n'], - 'subgen': ['-', 'w', 'i', 'o', 'k', 'n'], + 'chk': ['-', 'i' ], + 'conv': ['-', 'w', 'i', 'o', 'k', 'n'], + 'gen': ['-', 'w', 'o' ], + 'passchg': ['-', 'w', 'i', 'k', 'f', 'n'], + 'seedsplit': ['-', 'w', 'i', 'o', 'm', 'n'], + 'subgen': ['-', 'w', 'i', 'o', 'k', 'n'], }[invoked_as], 'text': { 'desc': desc, diff --git a/mmgen/xmrwallet/ops/restore.py b/mmgen/xmrwallet/ops/restore.py index a586c568..71ca74ba 100755 --- a/mmgen/xmrwallet/ops/restore.py +++ b/mmgen/xmrwallet/ops/restore.py @@ -29,16 +29,19 @@ class OpRestore(OpCreate): async def process_wallet(self, d, fn, last): def get_dump_data(): + def gen(): for fn in [self.get_wallet_fn(d, watch_only=wo) for wo in (True, False)]: ret = fn.parent / (fn.name + '.dump') if ret.exists(): yield ret + dump_fns = tuple(gen()) if not dump_fns: die(1, f"No suitable dump file found for '{fn}'") elif len(dump_fns) > 1: ymsg(f"Warning: more than one dump file found for '{fn}' - using the first!") + return MoneroWalletDumpFile.Completed( parent = self, fn = dump_fns[0]).data._asdict()['wallet_metadata'] diff --git a/test/clean.py b/test/clean.py index bed4c7a8..4bb27c5a 100755 --- a/test/clean.py +++ b/test/clean.py @@ -31,7 +31,9 @@ opts_data = { }, } -cfg = Config(opts_data=opts_data, init_opts={'skip_cfg_file': True}) +cfg = Config( + opts_data = opts_data, + init_opts = {'skip_cfg_file': True}) from test.overlay import get_overlay_tree_dir overlay_tree_dir = get_overlay_tree_dir(repo_root)