diff --git a/library/cloud/docker_image b/library/cloud/docker_image index 1727486f8a..512f17cfd1 100644 --- a/library/cloud/docker_image +++ b/library/cloud/docker_image @@ -235,7 +235,7 @@ def main(): module.exit_json(failed=failed, changed=manager.has_changed(), msg=msg, image_id=image_id) - except docker.client.APIError as e: + except docker.errors.APIError as e: module.exit_json(failed=True, changed=manager.has_changed(), msg="Docker API error: " + e.explanation) except RequestException as e: