From 7cc513e1d2e28975f6a464fc65e5ce2a86a48703 Mon Sep 17 00:00:00 2001 From: Jayson Reis Date: Tue, 19 Jan 2016 14:19:03 +0100 Subject: [PATCH] Avoid concatenating bytes with strings --- vcr/stubs/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index b372658..a703ff4 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -191,7 +191,8 @@ class VCRConnection(object): body of the request. So if that happens, let's just append the data 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): # Note: the real connection will only close if it's open, so