Python 2.7x and 3.xx compatibility fixes

Change-Id: I84eb3bf7691fa867acadf9dae8c4f56a9781bf73
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.py b/lib/utils.py
index e32a91b..e2188cc 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -298,4 +298,7 @@
     json_str                        The string containing the JSON data.
     """
 
-    return json.loads(json_str, object_pairs_hook=DotDict)
+    try:
+        return json.loads(json_str, object_pairs_hook=DotDict)
+    except TypeError:
+        return json.loads(json_str.decode("utf-8"), object_pairs_hook=DotDict)