summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-03-01 10:26:12 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-01 15:20:27 +0000
commitc3ff8454d8758015cbc5d3d7846fde9c42b633e5 (patch)
tree474b45d7f260b47cd4c2a3b970dfba3d7fde4414
parentc4e29c307c168b40b595983b16b7507fe9e09742 (diff)
downloadbuildstream-c3ff8454d8758015cbc5d3d7846fde9c42b633e5.tar.gz
runcli: rm unused 'color' and '**extra' params
The only customer for 'invoke' is the 'run' method on the same class. Make it private and simplify it's interface. Avoid disappointment by removing unused 'color' and 'extra' parameters from 'invoke'. These appear to have been here to mirror the interface of click.testing.CliRunner.invoke(), which this class replaced.
-rw-r--r--buildstream/plugintestutils/runcli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/plugintestutils/runcli.py b/buildstream/plugintestutils/runcli.py
index 83fdff721..79d42ec1f 100644
--- a/buildstream/plugintestutils/runcli.py
+++ b/buildstream/plugintestutils/runcli.py
@@ -346,7 +346,7 @@ class Cli():
except ValueError:
sys.__stdout__ = open('/dev/stdout', 'w')
- result = self.invoke(bst_cli, bst_args, binary_capture=binary_capture)
+ result = self._invoke(bst_cli, bst_args, binary_capture=binary_capture)
# Some informative stdout we can observe when anything fails
if self.verbose:
@@ -363,7 +363,7 @@ class Cli():
return result
- def invoke(self, cli_object, args=None, color=False, binary_capture=False, **extra):
+ def _invoke(self, cli_object, args=None, binary_capture=False):
exc_info = None
exception = None
exit_code = 0
@@ -378,7 +378,7 @@ class Cli():
capture.start_capturing()
try:
- cli_object.main(args=args or (), prog_name=cli_object.name, **extra)
+ cli_object.main(args=args or (), prog_name=cli_object.name)
except SystemExit as e:
if e.code != 0:
exception = e