From 5cf27815281b91b7a0482b05cb9984e8b4d8a489 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 28 Jul 2015 15:34:10 -0400 Subject: [PATCH] A little more cleanup regarding _compute_environment_string --- lib/ansible/plugins/action/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index defed26b5bc..1a723b99e59 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -96,8 +96,8 @@ class ActionBase: environments = [ environments ] for environment in environments: - if type(environment) != dict: - raise AnsibleError("environment must be a dictionary, received %s" % environment) + if not isinstance(environment, dict): + raise AnsibleError("environment must be a dictionary, received %s (%s)" % (environment, type(environment))) # very deliberatly using update here instead of combine_vars, as # these environment settings should not need to merge sub-dicts final_environment.update(environment)