diff options
author | Valentin David <valentin.david@gmail.com> | 2017-11-25 15:53:32 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-11-30 17:47:20 +0000 |
commit | 1db6202f29641596b170888272572fec45f13576 (patch) | |
tree | 355da182e44c749f9a16705edb6b92320039a26b | |
parent | d58d12e337697a02d74a51fdd9414928d9858b9c (diff) | |
download | buildstream-1db6202f29641596b170888272572fec45f13576.tar.gz |
Allow stdout and stderr to be overriden in Plugin.call
-rw-r--r-- | buildstream/plugin.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/buildstream/plugin.py b/buildstream/plugin.py index a793c5e5b..35b116dfe 100644 --- a/buildstream/plugin.py +++ b/buildstream/plugin.py @@ -624,12 +624,11 @@ class Plugin(): # def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs): - if 'stdout' in kwargs or 'stderr' in kwargs: - raise ValueError('May not override destination output') - with self._output_file() as output_file: - kwargs['stdout'] = output_file - kwargs['stderr'] = output_file + if 'stdout' not in kwargs: + kwargs['stdout'] = output_file + if 'stderr' not in kwargs: + kwargs['stderr'] = output_file if collect_stdout: kwargs['stdout'] = subprocess.PIPE |