zerver/worker/queue_processors.py: Open file in binary.

Open a file in binary mode instead of text mode.
This commit is contained in:
Eklavya Sharma
2016-07-10 04:02:15 +05:30
committed by Tim Abbott
parent 2f2e543a0e
commit 1f3ce7cf38
2 changed files with 1 additions and 1 deletions

View File

@@ -79,7 +79,7 @@ class QueueProcessingWorker(object):
line = u'%s\t%s\n' % (time.asctime(), ujson.dumps(data))
lock_fn = fn + '.lock'
with lockfile(lock_fn):
with open(fn, 'a') as f:
with open(fn, 'ab') as f:
f.write(line.encode('utf-8'))
reset_queries()