From 382f9b099927d1f5bf8d55f45b4aa0e50dba8790 Mon Sep 17 00:00:00 2001 From: Hiroaki Nakamura Date: Tue, 5 Jul 2016 21:34:27 +0900 Subject: [PATCH] Fix initializing err in _get_err_from_resp_json --- lib/ansible/modules/extras/cloud/lxd/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/extras/cloud/lxd/__init__.py b/lib/ansible/modules/extras/cloud/lxd/__init__.py index 23161ef631..46b2fda6ed 100644 --- a/lib/ansible/modules/extras/cloud/lxd/__init__.py +++ b/lib/ansible/modules/extras/cloud/lxd/__init__.py @@ -124,6 +124,7 @@ class LXDClient(object): @staticmethod def _get_err_from_resp_json(resp_json): + err = None metadata = resp_json.get('metadata', None) if metadata is not None: err = metadata.get('err', None)