Browse Source

minor cleanups

The MMGen Project 2 years ago
parent
commit
301394a9c5
3 changed files with 13 additions and 16 deletions
  1. 2 3
      mmgen/data/mmgen.cfg
  2. 3 5
      mmgen/tw/view.py
  3. 8 8
      test/test_py_d/ts_cfg.py

+ 2 - 3
mmgen/data/mmgen.cfg

@@ -38,9 +38,8 @@
 # Uncomment to override 'rpcpassword' from coin daemon config file:
 # rpc_password mypassword
 
-# Choose the backend to use for JSON-RPC connections.  Valid choices are
-# 'httplib', 'requests', 'curl', 'aiohttp' (Linux only) or 'auto' (defaults
-# to curl for Windows/MSYS2 and httplib for Linux):
+# Choose the backend to use for JSON-RPC connections.  Valid choices:
+# 'auto' (defaults to 'httplib'), 'httplib', 'requests', 'curl', 'aiohttp':
 # rpc_backend auto
 
 # Increase to allow aiohttp to make more simultaneous RPC connections to the

+ 3 - 5
mmgen/tw/view.py

@@ -278,9 +278,6 @@ class TwView(MMGenObject,metaclass=AsyncInit):
 		# so add NL here (' ' required because CUR_HOME erases preceding blank lines)
 		msg(' ')
 
-	def filter_data(self):
-		return self.data.copy()
-
 	def get_term_dimensions(self,min_cols,min_lines=None):
 		from ..term import get_terminal_size,get_char_raw,_term_dimensions
 		user_resized = False
@@ -572,8 +569,9 @@ class TwView(MMGenObject,metaclass=AsyncInit):
 				if self.scroll:
 					self.term.set('echo')
 				return self.disp_data
-			elif not scroll:
-				msg_r('\ninvalid keypress ')
+			else:
+				if not scroll:
+					msg_r('\ninvalid keypress ')
 				await asyncio.sleep(0.3)
 
 	@property

+ 8 - 8
test/test_py_d/ts_cfg.py

@@ -24,14 +24,14 @@ class TestSuiteCfg(TestSuiteBase):
 	color = True
 
 	cmd_group = (
-		('sysfile',            (40,'init with system cfg sample file in place', [])),
-		('no_metadata_sample', (40,'init with unversioned cfg sample file', [])),
-		('altered_sample',     (40,'init with user-modified cfg sample file', [])),
-		('old_sample',         (40,'init with old v2 cfg sample file', [])),
-		('old_sample_bad_var', (40,'init with old v2 cfg sample file and bad variable in mmgen.cfg', [])),
-		('coin_specific_vars', (40,'test setting of coin-specific vars', [])),
-		('chain_names',        (40,'test setting of chain names', [])),
-		('mnemonic_entry_modes',(40,'test setting of mnemonic entry modes', [])),
+		('sysfile',                  (40,'init with system cfg sample file in place', [])),
+		('no_metadata_sample',       (40,'init with unversioned cfg sample file', [])),
+		('altered_sample',           (40,'init with user-modified cfg sample file', [])),
+		('old_sample',               (40,'init with old v2 cfg sample file', [])),
+		('old_sample_bad_var',       (40,'init with old v2 cfg sample file and bad variable in mmgen.cfg', [])),
+		('coin_specific_vars',       (40,'setting coin-specific vars', [])),
+		('chain_names',              (40,'setting chain names', [])),
+		('mnemonic_entry_modes',     (40,'setting mnemonic entry modes', [])),
 	)
 
 	def __init__(self,trunner,cfgs,spawn):