Skip to content

Commit

Permalink
Do not allow one_shot when stream=True
Browse files Browse the repository at this point in the history
  • Loading branch information
aroxby-wayscript committed Jan 27, 2023
1 parent 3cf6341 commit e9460db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/api/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,11 @@ def stats(self, container, decode=None, stream=True, one_shot=None):
)
params['one-shot'] = one_shot
if stream:
if one_shot is not None:
raise errors.InvalidArgument(
'one_shot is only available in conjunction with '
'stream=False'
)
return self._stream_helper(self._get(url, params=params),
decode=decode)
else:
Expand Down

0 comments on commit e9460db

Please sign in to comment.