From 70ce16467350076e437c0951f41473d93fc84aaa Mon Sep 17 00:00:00 2001
From: Samuel Gaist <samuel.gaist@idiap.ch>
Date: Wed, 20 Mar 2019 11:53:45 +0100
Subject: [PATCH] [execution][base] Import simplejson as json to make it easy
 to swap

---
 beat/core/execution/base.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/beat/core/execution/base.py b/beat/core/execution/base.py
index 5d7d5c04..254c0429 100644
--- a/beat/core/execution/base.py
+++ b/beat/core/execution/base.py
@@ -47,7 +47,7 @@ import os
 import glob
 import collections
 import logging
-import simplejson
+import simplejson as json
 
 from .. import schema
 from .. import database
@@ -417,7 +417,7 @@ class BaseExecutor(object):
         return stats.io_statistics(self.data, self.input_list, self.output_list)
 
     def __str__(self):
-        return simplejson.dumps(self.data, indent=4)
+        return json.dumps(self.data, indent=4)
 
     def write(self, path):
         """Writes contents to precise filesystem location"""
@@ -431,7 +431,7 @@ class BaseExecutor(object):
         data = convert_experiment_configuration_to_container(self.data)
 
         with open(os.path.join(directory, "configuration.json"), "wb") as f:
-            json_data = simplejson.dumps(data, indent=2)
+            json_data = json.dumps(data, indent=2)
             f.write(json_data.encode("utf-8"))
 
         tmp_prefix = os.path.join(directory, "prefix")
@@ -447,7 +447,7 @@ class BaseExecutor(object):
         """Exports contents useful for a backend runner to run the algorithm"""
 
         with open(os.path.join(directory, "configuration.json"), "wb") as f:
-            json_data = simplejson.dumps(self.data, indent=2)
+            json_data = json.dumps(self.data, indent=2)
             f.write(json_data.encode("utf-8"))
 
         tmp_prefix = os.path.join(directory, "prefix")
-- 
GitLab