dispatch: handle writing unicode to file properly
This commit is contained in:
parent
e2d4e29750
commit
6bf2732d7f
@ -93,7 +93,7 @@ class DispatchMessage(generics.GenericAPIView):
|
||||
filename = os.path.abspath(action.destination)
|
||||
log.debug("sending '%s' to file %s", text, filename)
|
||||
with open(filename, 'w') as f:
|
||||
f.write(text)
|
||||
f.write(text.encode('utf8'))
|
||||
f.write(b'\n')
|
||||
|
||||
new_data = copy.deepcopy(message.data)
|
||||
|
Loading…
Reference in New Issue
Block a user