From c5d787d6fd57b3cea6731c2afd5ba9de05cda720 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 20 Aug 2011 19:59:21 -0400 Subject: [PATCH] cleanups --- requests/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/requests/models.py b/requests/models.py index a34a4a4..6d27425 100644 --- a/requests/models.py +++ b/requests/models.py @@ -266,8 +266,8 @@ class Request(object): Otherwise, assumes the data is already encoded appropriately, and returns it twice. - """ + if hasattr(data, 'items'): result = [] for k, vs in data.items(): @@ -375,7 +375,6 @@ class Request(object): self._build_response(why, is_error=True) - else: self._build_response(resp) self.response.ok = True @@ -386,7 +385,6 @@ class Request(object): return self.sent - class Response(object): """The core :class:`Response ` object. All :class:`Request ` objects contain a -- 2.7.4