aboutsummaryrefslogtreecommitdiffstats
path: root/policyhandler/policy_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'policyhandler/policy_utils.py')
-rw-r--r--policyhandler/policy_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/policyhandler/policy_utils.py b/policyhandler/policy_utils.py
index c96d4f6..c2a8b07 100644
--- a/policyhandler/policy_utils.py
+++ b/policyhandler/policy_utils.py
@@ -134,8 +134,8 @@ class Utils(object):
try:
return json.loads(json_str)
except (ValueError, TypeError) as err:
- Utils._logger.warn("unexpected json error(%s): len(%s) str[:100]: (%s)",
- str(err), len(json_str), str(json_str)[:100])
+ Utils._logger.warning("unexpected json error(%s): len(%s) str[:100]: (%s)",
+ str(err), len(json_str), str(json_str)[:100])
return json_str
@staticmethod
@@ -159,11 +159,11 @@ class Utils(object):
return True
if isinstance(body_1, dict) and isinstance(body_2, dict):
- if body_1.viewkeys() ^ body_2.viewkeys():
+ if body_1.keys() ^ body_2.keys():
Utils._logger.debug("keys %s != %s", json.dumps(body_1), json.dumps(body_2))
return False
- for key, val_1 in body_1.iteritems():
+ for key, val_1 in body_1.items():
if not Utils.are_the_same(val_1, body_2[key]):
return False
return True