mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-25 15:41:06 +00:00
add a couple more helpers
This commit is contained in:
parent
a44c5d0f11
commit
9bc00c4f76
@ -329,3 +329,19 @@ def await_file_vanishes(path, timeout=10):
|
||||
return
|
||||
time.sleep(1)
|
||||
raise FileShouldVanishException(path, timeout)
|
||||
|
||||
|
||||
def cli(reactor, node_dir, *argv):
|
||||
proto = _CollectOutputProtocol()
|
||||
reactor.spawnProcess(
|
||||
proto,
|
||||
sys.executable,
|
||||
[
|
||||
sys.executable, '-m', 'allmydata.scripts.runner',
|
||||
'--node-directory', node_dir,
|
||||
] + list(argv),
|
||||
)
|
||||
return proto.done
|
||||
|
||||
def magic_folder_cli(reactor, node_dir, *argv):
|
||||
return cli(reactor, node_dir, "magic-folder", *argv)
|
||||
|
Loading…
Reference in New Issue
Block a user