Python3 requires to open explicitly on binary mode to write bytes
This commit is contained in:
parent
fa8a895299
commit
e7aabf4799
|
@ -174,7 +174,7 @@ def save_response_on_error(test):
|
||||||
timestamp = datetime.datetime.now().isoformat().replace(':', '')
|
timestamp = datetime.datetime.now().isoformat().replace(':', '')
|
||||||
filename = '%s_%s.html' % (self.id(), timestamp)
|
filename = '%s_%s.html' % (self.id(), timestamp)
|
||||||
path = '/home/orchestra/snapshots'
|
path = '/home/orchestra/snapshots'
|
||||||
with open(os.path.join(path, filename), 'w') as dumpfile:
|
with open(os.path.join(path, filename), 'wb') as dumpfile:
|
||||||
dumpfile.write(self.rest.last_response.content)
|
dumpfile.write(self.rest.last_response.content)
|
||||||
raise
|
raise
|
||||||
return inner
|
return inner
|
||||||
|
|
Loading…
Reference in New Issue