Browse Source

minor fixes

The MMGen Project 6 months ago
parent
commit
590f4bc1e6
5 changed files with 7 additions and 9 deletions
  1. 2 5
      mmgen/addrfile.py
  2. 2 1
      mmgen/cfg.py
  3. 1 1
      mmgen/rpc/local.py
  4. 1 1
      mmgen/tw/unspent.py
  5. 1 1
      mmgen/tw/view.py

+ 2 - 5
mmgen/addrfile.py

@@ -299,11 +299,8 @@ class AddrFile(MMGenObject):
 			data = self.parse_file_body(lines[1:-1])
 			assert isinstance(data, list), 'Invalid file body data'
 		except Exception as e:
-			m = 'Invalid data in {} list file {!r}{} ({!s})'.format(
-				p.desc,
-				self.infile,
-				(f', content line {self.line_ctr}' if self.line_ctr else ''),
-				e)
+			m_add = f', content line {self.line_ctr}' if self.line_ctr else ''
+			m = f'Invalid data in {p.desc} list file ‘{fn}’{m_add} ({e!s})'
 			if exit_on_error:
 				die(3, m)
 			else:

+ 2 - 1
mmgen/cfg.py

@@ -854,7 +854,8 @@ def check_opts(cfg): # Raises exception if any check fails
 				from .wallet import get_wallet_data
 				wd = get_wallet_data(wtype='incog_hidden')
 				if val2 and val2 not in wd.fmt_codes:
-					die('UserOptError', f'Option conflict:\n  {fmt_opt(name)}, with\n  {fmt_opt(key2)}={val2}')
+					die('UserOptError',
+						f'Option {fmt_opt(name)} conflicts with option {fmt_opt(key2)}={val2}')
 
 		hidden_incog_output_params = hidden_incog_input_params
 

+ 1 - 1
mmgen/rpc/local.py

@@ -9,7 +9,7 @@
 #   https://gitlab.com/mmgen/mmgen-wallet
 
 """
-rpc: local RPC client class for the MMGen Project
+rpc.local: local RPC client class for the MMGen Project
 """
 
 import sys, json, asyncio, importlib

+ 1 - 1
mmgen/tw/unspent.py

@@ -115,7 +115,7 @@ class TwUnspentOutputs(TwView):
 
 		return data
 
-	def get_column_widths(self, data, wide, interactive):
+	def get_column_widths(self, data, *, wide, interactive):
 
 		show_mmid = self.show_mmid or wide
 

+ 1 - 1
mmgen/tw/view.py

@@ -381,7 +381,7 @@ class TwView(MMGenObject, metaclass=AsyncInit):
 	def gen_subheader(self, cw, color):
 		if self.twctl.use_cached_balances:
 			from ..color import nocolor, yellow
-			yield (nocolor, yellow)[color]('WARNING: Using cached balances. These may be out of date!')
+			yield (nocolor, yellow)[color]('Using cached balances. These may be out of date!')
 		else:
 			yield f'Displaying balances with {self.minconf} confirmation{suf(self.minconf)}'