summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-03-07 04:09:30 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-03-07 04:09:30 (GMT)
commit4e6294921726bd2c4197c012fd5cbc3905ba7560 (patch)
treeff3db93a5251c0a4d26f144b3bf615077ff391af /Lib
parent6b31fd0f13f5730b5a9b70be91a0edba3781e194 (diff)
downloadcpython-4e6294921726bd2c4197c012fd5cbc3905ba7560.zip
cpython-4e6294921726bd2c4197c012fd5cbc3905ba7560.tar.gz
cpython-4e6294921726bd2c4197c012fd5cbc3905ba7560.tar.bz2
Reverting the change made in r78431.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_urllib2.py1
-rw-r--r--Lib/urllib2.py3
2 files changed, 0 insertions, 4 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index ef59cfa..c0366dd 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -1209,7 +1209,6 @@ class RequestTests(unittest.TestCase):
self.get.add_data("spam")
self.assertTrue(self.get.has_data())
self.assertEqual("POST", self.get.get_method())
- self.assertRaises(TypeError,self.get.add_data, "more spam")
def test_get_full_url(self):
self.assertEqual("http://www.python.org/~jeremy/",
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 8b26971..122f777 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -226,9 +226,6 @@ 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):