diff --git a/beat/core/dock.py b/beat/core/dock.py index 96d3dff6f498508394481542b73eb3489f33b61a..78f1e23edc8c0f6e45f1def7b9c6a49c9dfc6dd0 100644 --- a/beat/core/dock.py +++ b/beat/core/dock.py @@ -44,7 +44,7 @@ Docker helper classes import os -import simplejson +import simplejson as json import socket import tempfile import time @@ -78,7 +78,7 @@ class Host(object): self.images_cache_filename ): with open(self.images_cache_filename, "r") as f: - Host.images_cache = simplejson.load(f) + Host.images_cache = json.load(f) # Discover the environments if discover: @@ -90,7 +90,7 @@ class Host(object): # (If necessary) Save the known infos about the images if self.images_cache_filename is not None: with open(self.images_cache_filename, "w") as f: - simplejson.dump(Host.images_cache, f, indent=4) + json.dump(Host.images_cache, f, indent=4) def __contains__(self, key): return (key in self.processing_environments) or (key in self.db_environments) @@ -180,7 +180,7 @@ class Host(object): if status == 0: try: - infos = simplejson.loads(stdout) + infos = json.loads(stdout) Host.images_cache[image] = infos return infos except Exception as e: @@ -492,7 +492,7 @@ class Host(object): return None try: - return simplejson.loads(stdout)[0]["State"]["Status"] + return json.loads(stdout)[0]["State"]["Status"] except Exception: return None