instance.py

changeset 6
46c89e5a219f
parent 4
d72c4844e791
child 7
e189d4a6cb8c
--- a/instance.py	Fri Jan 19 16:00:36 2018 +0000
+++ b/instance.py	Fri Jan 19 16:53:13 2018 +0000
@@ -49,7 +49,10 @@
             return None
 
         try:
-            return json.loads(line)
+            res=json.loads(line)
+            if 'type' not in res:
+                res['type']='UNKNOWN'
+            return res
         except:
             logging.warning('JSON parse failed on: "%s"' % line)
 

mercurial