From 5a7bb6850fdedd316bf7fb14044eafa75d95e443 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 15 Sep 2026 10:51:04 +0000 Subject: [PATCH] fixes, cleanups, comments (minor) --- mmgen/autosign/__init__.py | 2 +- mmgen/cfg.py | 2 +- mmgen/fileutil.py | 2 +- test/cmdtest_d/xmrwallet.py | 2 +- test/overlay/fakemods/mmgen/cfg.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mmgen/autosign/__init__.py b/mmgen/autosign/__init__.py index 878bce42..fb93b186 100755 --- a/mmgen/autosign/__init__.py +++ b/mmgen/autosign/__init__.py @@ -69,7 +69,7 @@ class Autosign: have_xmr = False xmr_only = False - def init_fixup(self): # see test/overlay/fakemods/mmgen/autosign.py + def init_fixup(self): # see test/overlay/fakemods/mmgen/autosign/__init__.py pass def __init__(self, cfg, *, cmd=None): diff --git a/mmgen/cfg.py b/mmgen/cfg.py index 281a9a41..5c3214c7 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -260,7 +260,7 @@ class Config(Lockable): xmrwallet_compat = False priority = 0 - test_suite = False # 13 references + test_suite = False # 14 references - used before lock - do not remove # external use: _opts = None diff --git a/mmgen/fileutil.py b/mmgen/fileutil.py index 5f4cf3b0..a0eed6c7 100755 --- a/mmgen/fileutil.py +++ b/mmgen/fileutil.py @@ -39,7 +39,7 @@ def check_or_create_dir(cfg, path): try: os.listdir(path) except: - if getattr(cfg, 'test_suite', False) and os.path.exists(path): # path is a link or regular file + if cfg.test_suite and os.path.exists(path): # path is a link or regular file from subprocess import run run(['rm', '-rf', str(path)]) try: diff --git a/test/cmdtest_d/xmrwallet.py b/test/cmdtest_d/xmrwallet.py index 66e83125..441dc956 100755 --- a/test/cmdtest_d/xmrwallet.py +++ b/test/cmdtest_d/xmrwallet.py @@ -68,7 +68,7 @@ class CmdTestXMRWallet(CmdTestBase): dfl_random_txs = 3 color = True # Bob’s daemon is stopped via process kill, not RPC, so put Bob last in list: - # user sid autosign shift kal_range add_coind_args + # user sid autosign port_shift kal_range add_coind_args user_data = ( ('miner', '98831F3A', False, 130, '1-2', []), ('alice', 'FE3C6545', False, 150, '1-4', []), diff --git a/test/overlay/fakemods/mmgen/cfg.py b/test/overlay/fakemods/mmgen/cfg.py index 4e21d287..93aaf471 100644 --- a/test/overlay/fakemods/mmgen/cfg.py +++ b/test/overlay/fakemods/mmgen/cfg.py @@ -25,11 +25,11 @@ for k, v in { 'min_urandchars': 3, 'err_disp_timeout': 0.1, 'short_disp_timeout': 0.1, + 'test_suite': True, ### everything below is missing in Config: # these are referenced in production code: - 'test_suite': True, 'test_suite_cfgtest': False, # cfgfile - using getattr() with dfl val - OK 'test_suite_popen_spawn': False, # line_input() - using getattr() with dfl val - OK 'test_suite_hold_protect_disable': False, # init_term() - using getattr() with dfl val - OK