Skip to content

Commit

Permalink
ccmlib/node: handle using stdout or stderr
Browse files Browse the repository at this point in the history
intermediate command used, should be using kwargs as is
since it can cause a conflict in parameters.
  • Loading branch information
fruch committed Nov 29, 2023
1 parent ae645ad commit a93125b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ccmlib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1292,9 +1292,8 @@ def stress_process(self, stress_options, **kwargs):
has_throttle = any(['throttle=' in o for o in stress_options])
if has_limit or has_throttle:
args = stress + ['version']
p = subprocess.Popen(args,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True,
**kwargs)
_kwargs = {**kwargs, **dict(stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)}
p = subprocess.Popen(args, **_kwargs)
stdout, stderr = p.communicate()

if p.returncode == 1 and has_throttle:
Expand Down

0 comments on commit a93125b

Please sign in to comment.