From 858a8b8e67962e54403154bb1e7a6ca65d43f449 Mon Sep 17 00:00:00 2001 From: curious-eyes Date: Sat, 27 Feb 2016 21:43:45 +0900 Subject: [PATCH] Fix #2761: gce.py - UnboundLocalError: local variable 'md' --- cloud/google/gce.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cloud/google/gce.py b/cloud/google/gce.py index 32b6d2d5207..b8c2700c9e8 100644 --- a/cloud/google/gce.py +++ b/cloud/google/gce.py @@ -389,13 +389,13 @@ def create_instances(module, gce, instance_names): except SyntaxError as e: module.fail_json(msg='bad metadata syntax') - if hasattr(libcloud, '__version__') and libcloud.__version__ < '0.15': - items = [] - for k, v in md.items(): - items.append({"key": k, "value": v}) - metadata = {'items': items} - else: - metadata = md + if hasattr(libcloud, '__version__') and libcloud.__version__ < '0.15': + items = [] + for k, v in md.items(): + items.append({"key": k, "value": v}) + metadata = {'items': items} + else: + metadata = md ex_sa_perms = [] bad_perms = []