new AutosignConfig class
This commit is contained in:
parent
b80a69dd92
commit
a19db1858a
3 changed files with 11 additions and 8 deletions
|
|
@ -16,10 +16,14 @@ import sys,os,asyncio
|
|||
from subprocess import run,PIPE,DEVNULL
|
||||
from collections import namedtuple
|
||||
|
||||
from .cfg import Config
|
||||
from .util import msg,msg_r,ymsg,rmsg,gmsg,bmsg,die,suf,fmt,fmt_list
|
||||
from .color import yellow,red,orange
|
||||
from .wallet import Wallet
|
||||
|
||||
class AutosignConfig(Config):
|
||||
_set_ok = ('usr_randchars','_proto','outdir','passwd_file')
|
||||
|
||||
class Autosign:
|
||||
|
||||
dfl_mountpoint = os.path.join(os.sep,'mnt','mmgen_autosign')
|
||||
|
|
|
|||
|
|
@ -116,7 +116,9 @@ This command is currently available only on Linux-based platforms.
|
|||
}
|
||||
}
|
||||
|
||||
cfg = Config(
|
||||
from .autosign import Autosign,AutosignConfig
|
||||
|
||||
cfg = AutosignConfig(
|
||||
opts_data = opts_data,
|
||||
init_opts = {
|
||||
'quiet': True,
|
||||
|
|
@ -129,9 +131,6 @@ cfg = Config(
|
|||
|
||||
cmd_args = cfg._args
|
||||
|
||||
type(cfg)._set_ok += ('outdir','passwd_file')
|
||||
|
||||
from .autosign import Autosign
|
||||
asi = Autosign(cfg)
|
||||
|
||||
cfg._post_init()
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ from .ts_shared import *
|
|||
from .input import *
|
||||
|
||||
from mmgen.led import LEDControl
|
||||
from mmgen.autosign import Autosign
|
||||
from mmgen.autosign import Autosign,AutosignConfig
|
||||
|
||||
filedir_map = (
|
||||
('btc',''),
|
||||
|
|
@ -91,9 +91,9 @@ class TestSuiteAutosignBase(TestSuiteBase):
|
|||
|
||||
self.network_ids = [c+'_tn' for c in self.daemon_coins] + self.daemon_coins
|
||||
|
||||
as_cfg = Config()
|
||||
type(as_cfg)._set_ok += ('outdir','passwd_file')
|
||||
self.asi = Autosign(as_cfg)
|
||||
self.asi = Autosign(
|
||||
AutosignConfig()
|
||||
)
|
||||
|
||||
if self.simulate and not cfg.exact_output:
|
||||
die(1,red('This command must be run with --exact-output enabled!'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue