diff options
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index d1d12e6..47fe75e 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -192,6 +192,9 @@ class Request: # Begin deprecated methods 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): |