From 3bfe9a7b50ff77f0e6e62d4db643e59261802205 Mon Sep 17 00:00:00 2001 From: Ian Babrou Date: Thu, 12 Mar 2015 11:04:50 +0300 Subject: [PATCH] fixed: global name 'e' is not defined --- lib/ansible/modules/cloud/docker/docker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index f3dff84bca..32be89caff 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -1153,7 +1153,7 @@ class DockerManager(object): email=self.module.params.get('email'), registry=self.module.params.get('registry') ) - except e: + except Exception as e: self.module.fail_json(msg="failed to login to the remote registry, check your username/password.", error=repr(e)) try: last = None @@ -1169,7 +1169,7 @@ class DockerManager(object): else: # Unrecognized status string. self.module.fail_json(msg="Unrecognized status from pull.", status=status) - except e: + except Exception as e: self.module.fail_json(msg="Failed to pull the specified image: %s" % resource, error=repr(e)) def create_containers(self, count=1):