Browse Source

minor fixes and cleanups

The MMGen Project 3 years ago
parent
commit
3c015fa34f
4 changed files with 6 additions and 2 deletions
  1. 1 0
      mmgen/main_tool.py
  2. 3 1
      mmgen/tool/common.py
  3. 1 0
      mmgen/tool/file.py
  4. 1 1
      mmgen/wallet.py

+ 1 - 0
mmgen/main_tool.py

@@ -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]

+ 3 - 1
mmgen/tool/common.py

@@ -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

+ 1 - 0
mmgen/tool/file.py

@@ -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)',

+ 1 - 1
mmgen/wallet.py

@@ -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