summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-03-01 10:26:12 +0000
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-03-01 10:58:32 +0000
commitb56298b6604b82ced04b53bb1b268823bb23647e (patch)
tree31e2dcc49d03fc2bb2d87411282af3f8facbcdc5
parent57a314d8793b64859598c2217208e2d1d83af5b5 (diff)
downloadbuildstream-aevri/unused_color.tar.gz
runcli: rm unused 'color' and '**extra' paramsaevri/unused_color
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