diff options
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 122f777..8b26971 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -226,6 +226,9 @@ class Request: # XXX these helper methods are lame def add_data(self, data): + if self.has_data(): + raise TypeError("Request Obj already contains data: %s" % + self.data) self.data = data def has_data(self): |