From 301394a9c5dd736a76334f73d26651f05257dec5 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 3 Jan 2023 10:36:07 +0000 Subject: [PATCH] minor cleanups --- mmgen/data/mmgen.cfg | 5 ++--- mmgen/tw/view.py | 8 +++----- test/test_py_d/ts_cfg.py | 16 ++++++++-------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/mmgen/data/mmgen.cfg b/mmgen/data/mmgen.cfg index 0aae2a75..bea833d0 100644 --- a/mmgen/data/mmgen.cfg +++ b/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 diff --git a/mmgen/tw/view.py b/mmgen/tw/view.py index 5d2630dd..572c3d28 100755 --- a/mmgen/tw/view.py +++ b/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 diff --git a/test/test_py_d/ts_cfg.py b/test/test_py_d/ts_cfg.py index 8299d2a4..32ad9a9d 100755 --- a/test/test_py_d/ts_cfg.py +++ b/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):