Skip to content

Commit

Permalink
Renamed the Requests response object to http_response for more clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Loesch committed May 31, 2013
1 parent 94d3352 commit 4c59e8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sickle/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,19 @@ class OAIResponse(object):
:param params: The OAI parameters for the request.
:type params: dict
"""
def __init__(self, response, params):
def __init__(self, http_response, params):
self.params = params
self.response = response
self.http_response = http_response

@property
def raw(self):
"""The server's response as unicode."""
return self.response.text
return self.http_response.text

@property
def xml(self):
"""The server's response as parsed XML."""
return etree.XML(self.response.text.encode("utf8"), parser=XMLParser)
return etree.XML(self.http_response.text.encode("utf8"), parser=XMLParser)

def __repr__(self):
return '<OAIResponse %s>' % self.params.get('verb')
Expand Down

0 comments on commit 4c59e8b

Please sign in to comment.