whitespace, minor cleanups (5 files)
This commit is contained in:
parent
f44ca874ec
commit
6ef0aef487
5 changed files with 10 additions and 8 deletions
|
|
@ -64,7 +64,7 @@ def shred_file(cfg, fn, *, iterations=30):
|
|||
['shred', '--force', f'--iterations={iterations}', '--zero', '--remove=wipesync']
|
||||
+ (['--verbose'] if cfg.verbose else [])
|
||||
+ [str(fn)],
|
||||
check=True)
|
||||
check = True)
|
||||
set_vt100()
|
||||
|
||||
def _check_file_type_and_access(fname, ftype, *, blkdev_ok=False):
|
||||
|
|
|
|||
|
|
@ -392,9 +392,8 @@ if gc.prog_name.endswith('-tool'):
|
|||
args, kwargs = process_args(cmd, args, cls)
|
||||
|
||||
func = getattr(cls(cfg, cmdname=cmd), cmd)
|
||||
ret = async_run(cfg, func, args=args, kwargs=kwargs) if isAsync(func) else func(*args, **kwargs)
|
||||
|
||||
process_result(
|
||||
ret,
|
||||
async_run(cfg, func, args=args, kwargs=kwargs) if isAsync(func) else func(*args, **kwargs),
|
||||
pager = kwargs.get('pager'),
|
||||
print_result = True)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ class MacOSRamDisk:
|
|||
self.cfg._util.qmsg(f'{self.desc.capitalize()} {self.label.hl()} at path {self.path} already exists')
|
||||
return
|
||||
self.cfg._util.qmsg(f'Creating {self.desc} {self.label.hl()} of size {self.size}MB')
|
||||
cp = run(['hdiutil', 'attach', '-nomount', f'ram://{2048 * self.size}'], stdout=PIPE, check=True)
|
||||
cp = run(
|
||||
['hdiutil', 'attach', '-nomount', f'ram://{2048 * self.size}'],
|
||||
stdout = PIPE,
|
||||
check = True)
|
||||
self.dev_name = cp.stdout.decode().strip()
|
||||
self.cfg._util.qmsg(f'Created {self.desc} {self.label.hl()} [{self.dev_name}]')
|
||||
run(['diskutil', 'eraseVolume', 'APFS', self.label, self.dev_name], stdout=redir, check=True)
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ class RPCClient:
|
|||
return self.process_http_resp(await self.backend.run(
|
||||
payload = {'id': 1, 'jsonrpc': '2.0', 'method': method, 'params': params},
|
||||
timeout = timeout,
|
||||
host_path = self.make_host_path(wallet)
|
||||
))
|
||||
host_path = self.make_host_path(wallet)))
|
||||
|
||||
async def batch_call(self, method, param_list, *, timeout=None, wallet=None):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from mmgen.proto.rune.tx.protobuf import (
|
|||
deposit_tx_parms,
|
||||
swap_tx_parms)
|
||||
|
||||
from ..include.common import vmsg, silence, end_silence
|
||||
from ..include.common import vmsg, qmsg, silence, end_silence
|
||||
|
||||
test_cfg = Config({'coin': 'rune', 'test_suite': True})
|
||||
|
||||
|
|
@ -171,7 +171,8 @@ def test_tx(src, cfg, vec):
|
|||
if tx.txid not in (vec.txid, vec_txid2):
|
||||
raise ValueError(f'{tx.txid} not in ({vec.txid}, {vec_txid2})')
|
||||
if tx.txid == vec_txid2:
|
||||
ymsg('\nWarning: non-standard TxID produced')
|
||||
qmsg('')
|
||||
ymsg('Warning: non-standard TxID produced')
|
||||
|
||||
if src == 'parse' and parms.from_addr:
|
||||
built_tx = build_tx(cfg, proto, parms, null_fee=vec.null_fee)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue