Show More
@@ -209,15 +209,16 b' def update_history_from_logs(config, cha' | |||
|
209 | 209 | |
|
210 | 210 | |
|
211 | 211 | def write_history(config, message): |
|
212 | """ writes a messge to a base64encoded filename """ | |
|
212 | """ writes a message to a base64encoded filename """ | |
|
213 | 213 | history_location = config.get('history.location') |
|
214 | 214 | if not os.path.exists(history_location): |
|
215 | 215 | return |
|
216 | 216 | try: |
|
217 | 217 | LOCK.acquire_write_lock() |
|
218 | 218 | filepath = log_filepath(history_location, message['channel']) |
|
219 | json_message = json.dumps(message) | |
|
219 | 220 | with open(filepath, 'ab') as f: |
|
220 |
|
|
|
221 | f.write(json_message) | |
|
221 | 222 | f.write('\n') |
|
222 | 223 | finally: |
|
223 | 224 | LOCK.release_write_lock() |
General Comments 0
You need to be logged in to leave comments.
Login now