1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-10 09:35:34 +00:00

Avoid concatenating bytes with strings

This commit is contained in:
Jayson Reis
2016-01-19 14:19:03 +01:00
parent 4f3c5c0a6e
commit 7cc513e1d2

View File

@@ -191,7 +191,8 @@ class VCRConnection(object):
body of the request. So if that happens, let's just append the data body of the request. So if that happens, let's just append the data
onto the most recent request in the cassette. onto the most recent request in the cassette.
''' '''
self._vcr_request.body = (self._vcr_request.body or '') + data self._vcr_request.body = self._vcr_request.body + data \
if self._vcr_request.body else data
def close(self): def close(self):
# Note: the real connection will only close if it's open, so # Note: the real connection will only close if it's open, so