instance.py

changeset 23
86b42610d5a8
parent 21
c36e549a7f12
child 24
94d58d514d69
equal deleted inserted replaced
22:c3e95212e3f0 23:86b42610d5a8
87 res=json.loads(line) 87 res=json.loads(line)
88 if 'type' not in res: 88 if 'type' not in res:
89 res['type']='UNKNOWN' 89 res['type']='UNKNOWN'
90 return res 90 return res
91 except: 91 except:
92 logging.debug('JSON parse failed on: "%s"' % line) 92 logging.debug('JSON parse failed on: "%s"' % str(line))
93 93
94 errmsg=line 94 errmsg=line
95 for line in iter(stream.readline, b''): 95 for line in iter(stream.readline, b''):
96 errmsg=errmsg+line 96 errmsg=errmsg+line
97 97

mercurial