Skip to content
Myr

string formatting supports None. Who knew.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent f7abfa8 · Browse files · 1 file+4 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−11 removed

  • other:+4 added−11 removed

1 file+4 added−11 removed

modified:requests/core.py+4 added-11 removed
62 unmodified lines
63 self.sent = False64 65 66 def __repr__(self):67 try:68 repr = '<Request [%s]>' % (self.method)67 return '<Request [%s]>' % (self.method)69 except:70 repr = '<Request object>'71 return repr68 69 70 def __setattr__(self, name, value):71 if (name == 'method') and (value):
130 unmodified lines
202 self.response.content = resp.read()203204 success = True205210 except urllib2.HTTPError, why:206 except(urllib2.HTTPError, why):207 self.response.status_code = why.code208209 210 self.sent = True if success else False
12 unmodified lines
223 self.status_code = None224 self.headers = dict()225 226 def __repr__(self):231 try:232 repr = '<Response [%s]>' % (self.status_code)233 except:234 repr = '<Response object>'235 return repr227 return '<Response [%s]>' % (self.status_code)228 229230 231class AuthObject(object):232 """The :class:`AuthObject` is a simple HTTP Authentication token. When
182 unmodified lines