From a9f795d2a435913841e5f66f2d05ddfdfb42e9c1 Mon Sep 17 00:00:00 2001
From: Romain Broucquart <romain.broucquart@synchrotron-soleil.fr>
Date: Thu, 17 Sep 2020 10:07:35 +0200
Subject: [PATCH] [ContextSaver] Json top level is now a dict

And not an array anymore.
---
 ContextSaver.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ContextSaver.py b/ContextSaver.py
index 24b3e49..09efdbc 100644
--- a/ContextSaver.py
+++ b/ContextSaver.py
@@ -152,7 +152,7 @@ if __name__ == "__main__":
 
     #######################################################
     # Prepare array for result
-    results = []
+    results = dict()
 
     #######################################################
     # Scan all devices
@@ -171,13 +171,12 @@ if __name__ == "__main__":
 
         # Build json dict
         jdict = {
-                "tangopath":dev,
                 "wattributes":wattr,
                 "properties":props,
                 }
 
         # Add to results
-        results.append(jdict)
+        results[dev] = jdict
 
     logger.info("Done")
 
-- 
GitLab