Pass bytes to NamedTemporaryFile.write()

In Python 3, this function takes bytes as an input.

Change-Id: I45faa50c4796605885489c9003a1b23b0f0b3080
This commit is contained in:
Cyril Roelandt
2014-03-04 01:15:16 +01:00
parent b048b1a5bd
commit 6ea5e8b013

View File

@@ -1321,7 +1321,7 @@ class ShellTestResources(ShellBase):
self.m.ReplayAll()
with tempfile.NamedTemporaryFile() as data_file:
data_file.write('{"message":"Content"}')
data_file.write(b'{"message":"Content"}')
data_file.flush()
text = self.shell(
'resource-signal {0} {1} -f {2}'.format(