diff options
author | Joffrey F <joffrey@docker.com> | 2017-08-15 16:07:47 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2017-08-15 16:44:06 -0700 |
commit | 397bec68ba46e6ef771404c8aa6e7cb16ebd2e70 (patch) | |
tree | cc95fe9ee7b9f9336dadf8307096bd4311cb7a49 /docker | |
parent | e9fab1432b974ceaa888b371e382dfcf2f6556e4 (diff) | |
download | docker-py-1686-check-api-features.tar.gz |
Handle untyped ContainerSpec dict in _check_api_features1686-check-api-features
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'docker')
-rw-r--r-- | docker/api/service.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/api/service.py b/docker/api/service.py index cc16cc3..4b555a5 100644 --- a/docker/api/service.py +++ b/docker/api/service.py @@ -38,7 +38,7 @@ def _check_api_features(version, task_template, update_config): 'Placement.preferences is not supported in' ' API version < 1.27' ) - if task_template.container_spec.get('TTY'): + if task_template.get('ContainerSpec', {}).get('TTY'): if utils.version_lt(version, '1.25'): raise errors.InvalidVersion( 'ContainerSpec.TTY is not supported in API version < 1.25' |