rest.py

changeset 123
aeb0d0788869
parent 121
ac07779f788d
child 124
7b2cd8b1ba86
equal deleted inserted replaced
122:f899af683bbe 123:aeb0d0788869
98 except Exception as e: 98 except Exception as e:
99 Irc.broadcast ('%s provided bad JSON: %s' % (address, e)) 99 Irc.broadcast ('%s provided bad JSON: %s' % (address, e))
100 100
101 try: 101 try:
102 with open ('rejected_json.txt', 'w') as fp: 102 with open ('rejected_json.txt', 'w') as fp:
103 fp.write (str (e))
103 fp.write (jsonstring) 104 fp.write (jsonstring)
104 Irc.broadcast ('bad json written to rejected_json.txt') 105 Irc.broadcast ('bad json written to rejected_json.txt')
105 except Exception as e: 106 except Exception as e:
106 Irc.broadcast ('failed to log json because %s' % e) 107 Irc.broadcast ('failed to log json because %s' % e)
107 pass 108 pass

mercurial