Pass bytes to NamedTemporaryFile.write()
In Python 3, this function takes bytes as an input. Change-Id: I45faa50c4796605885489c9003a1b23b0f0b3080
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user