mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 21:17:54 +00:00
Parameterize the options object to the run_cli
helper
This commit is contained in:
parent
d4afa15d20
commit
f19bf8cf86
@ -69,6 +69,9 @@ def run_cli_native(verb, *args, **kwargs):
|
||||
Most code should prefer ``run_cli_unicode`` which deals with all the
|
||||
necessary encoding considerations.
|
||||
|
||||
:param runner.Options options: The options instance to use to parse the
|
||||
given arguments.
|
||||
|
||||
:param native_str verb: The command to run. For example,
|
||||
``"create-node"``.
|
||||
|
||||
@ -88,6 +91,7 @@ def run_cli_native(verb, *args, **kwargs):
|
||||
matching native behavior. If True, stdout/stderr are returned as
|
||||
bytes.
|
||||
"""
|
||||
options = kwargs.pop("options", runner.Options())
|
||||
nodeargs = kwargs.pop("nodeargs", [])
|
||||
encoding = kwargs.pop("encoding", None) or getattr(sys.stdout, "encoding") or "utf-8"
|
||||
return_bytes = kwargs.pop("return_bytes", False)
|
||||
@ -134,7 +138,7 @@ def run_cli_native(verb, *args, **kwargs):
|
||||
d.addCallback(
|
||||
partial(
|
||||
runner.parse_or_exit,
|
||||
runner.Options(),
|
||||
options,
|
||||
),
|
||||
stdout=stdout,
|
||||
stderr=stderr,
|
||||
|
Loading…
Reference in New Issue
Block a user