mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-26 16:11:08 +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
|
return
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
raise FileShouldVanishException(path, timeout)
|
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