instance.py

changeset 6
46c89e5a219f
parent 4
d72c4844e791
child 7
e189d4a6cb8c
equal deleted inserted replaced
5:4c5514b2fa76 6:46c89e5a219f
47 logging.info('Pipe EOF?') 47 logging.info('Pipe EOF?')
48 48
49 return None 49 return None
50 50
51 try: 51 try:
52 return json.loads(line) 52 res=json.loads(line)
53 if 'type' not in res:
54 res['type']='UNKNOWN'
55 return res
53 except: 56 except:
54 logging.warning('JSON parse failed on: "%s"' % line) 57 logging.warning('JSON parse failed on: "%s"' % line)
55 58
56 errmsg=line 59 errmsg=line
57 for line in iter(self.proc.stderr.readline, b''): 60 for line in iter(self.proc.stderr.readline, b''):

mercurial