projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ee6c1f
)
simplify the URL check
author
Kenneth Reitz
<me@kennethreitz.com>
Sun, 23 Oct 2011 00:57:39 +0000
(20:57 -0400)
committer
Kenneth Reitz
<me@kennethreitz.com>
Sun, 23 Oct 2011 00:57:39 +0000
(20:57 -0400)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index 5d78bdfff9ad97569b9da79061fdbd615cf5da64..b2142ea8656dc773b5fdd2d622839d4a116372ad 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-130,13
+130,6
@@
class Request(object):
return '<Request [%s]>' % (self.method)
- def _checks(self):
- """Deterministic checks for consistency."""
-
- if not self.url:
- raise URLRequired
-
-
def _get_opener(self):
"""Creates appropriate opener object for urllib2."""
@@
-328,7
+321,9
@@
class Request(object):
already been sent.
"""
- self._checks()
+ # Some people...
+ if not self.url:
+ raise URLRequired
# Logging
if self.config.get('verbose'):