Skip to content
Myr

simplify the URL check

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 0ee6c1f · Browse files · 1 file+3 added−8 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+3 added−8 removed

  • other:+3 added−8 removed

1 file+3 added−8 removed

modified:requests/models.py+3 added-8 removed
128 unmodified lines
129 def __repr__(self):130 return '<Request [%s]>' % (self.method)131132133 def _checks(self):134 """Deterministic checks for consistency."""135136 if not self.url:137 raise URLRequired138139133 def _get_opener(self):134 """Creates appropriate opener object for urllib2."""135136 _handlers = []
183 unmodified lines
320 :param anyway: If True, request will be sent, even if it has321 already been sent.322 """323331 self._checks()324 # Some people...325 if not self.url:326 raise URLRequired327328 # Logging329 if self.config.get('verbose'):330 self.config.get('verbose').write('%s %s %s\n' % (
365 unmodified lines