From 9a72a0acf37cf1542870b678550f1ff2ee144076 Mon Sep 17 00:00:00 2001 From: Zach Date: Sun, 25 Apr 2021 18:51:23 +0300 Subject: [PATCH] fix 'str' object has no attribute 'get' The function _compare_value attempts to return if "resp_value" is not set. The problem occurs when one of the functions sets the response value "None" as string, rather than pythonic None. This is a fix to also exit this function on a "None" string response value. --- plugins/module_utils/gcp_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/module_utils/gcp_utils.py b/plugins/module_utils/gcp_utils.py index 643c8ca..6558304 100644 --- a/plugins/module_utils/gcp_utils.py +++ b/plugins/module_utils/gcp_utils.py @@ -394,7 +394,7 @@ class GcpRequest(object): diff = None # If a None is found, a difference does not exist. # Only differing values matter. - if not resp_value: + if not resp_value or resp_value == "None": return None # Can assume non-None types at this point.