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''): |