From 095221a7b20a0b1c72504ca8cab62aa239104381 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 19 Jun 2015 16:46:46 -0500 Subject: [PATCH] dispatch: properly write bytes to file --- dr_botzo/dispatch/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr_botzo/dispatch/views.py b/dr_botzo/dispatch/views.py index 3a15ac3..5bb574c 100644 --- a/dr_botzo/dispatch/views.py +++ b/dr_botzo/dispatch/views.py @@ -80,7 +80,7 @@ class DispatchMessage(generics.GenericAPIView): log.debug("sending '%s' to file %s", message.data['message'], filename) with open(filename, 'w') as f: f.write(message.data['message']) - f.write('\n') + f.write(b'\n') new_data = copy.deepcopy(message.data) new_data['status'] = "OK"