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 |