Empty string should not be returned as None

This commit is contained in:
Honza Král
2014-02-10 18:14:39 +01:00
parent b8762b647d
commit 36ff358948
+3 -4
View File
@@ -271,7 +271,7 @@ class Transport(object):
connection = self.get_connection()
try:
status, headers, raw_data = connection.perform_request(method, url, params, body, ignore=ignore)
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore)
except ConnectionError:
self.mark_dead(connection)
@@ -281,8 +281,7 @@ class Transport(object):
else:
# connection didn't fail, confirm it's live status
self.connection_pool.mark_live(connection)
data = None
if raw_data:
data = self.deserializer.loads(raw_data, headers.get('content-type'))
if data:
data = self.deserializer.loads(data, headers.get('content-type'))
return status, data