Skip to content

Commit

Permalink
Merge pull request #711 from ClusterHQ/exec_inspect_version
Browse files Browse the repository at this point in the history
Change minimum API version for exec_inspect
  • Loading branch information
shin- committed Aug 24, 2015
2 parents cfb20f8 + 7ba8332 commit 4008cbc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ def exec_create(self, container, cmd, stdout=True, stderr=True, tty=False,
return self._result(res, True)

def exec_inspect(self, exec_id):
if utils.compare_version('1.15', self._version) < 0:
raise errors.InvalidVersion('Exec is not supported in API < 1.15')
if utils.compare_version('1.16', self._version) < 0:
raise errors.InvalidVersion(
'exec_inspect is not supported in API < 1.16'
)
if isinstance(exec_id, dict):
exec_id = exec_id.get('Id')
res = self._get(self._url("/exec/{0}/json".format(exec_id)))
Expand Down

0 comments on commit 4008cbc

Please sign in to comment.