@@ -229,6 +229,7 @@ def process_args(cmd,cmd_args,cls):
u_nkwargs = len(cmd_args) - len(c_args)
u_kwargs = {}
if flag == 'VAR_ARGS':
+ cmd_args = ['dummy_arg'] + cmd_args
t = [a.split('=',1) for a in cmd_args if '=' in a]
tk = [a[0] for a in t]
tk_bad = [a for a in tk if a not in c_kwargs]
@@ -20,10 +20,12 @@
tool/common.py: Base class and shared routines for the 'mmgen-tool' utility
"""
+from ..objmethods import MMGenObject
+
def options_annot_str(l):
return "(valid options: '{}')".format( "','".join(l) )
-class tool_cmd_base:
+class tool_cmd_base(MMGenObject):
need_proto = False
need_addrtype = False
@@ -67,6 +67,7 @@ class tool_cmd(tool_cmd_base):
return self._file_chksum(mmgen_passwdfile,PasswordList)
async def txview(
+ self,
varargs_call_sig = { # hack to allow for multiple filenames
'args': (
'mmgen_tx_file(s)',
@@ -206,7 +206,7 @@ class Wallet(MMGenObject,metaclass=WalletMeta):
return None
@classmethod
- def ext_to_type(cls,ext,proto):
+ def ext_to_type(cls,ext,proto=None):
for c in cls.wallet_classes:
if ext == getattr(c,'ext',None):
return c