]> granicus.if.org Git - python/commitdiff
Reverting the change made in r78434
authorSenthil Kumaran <orsenthil@gmail.com>
Sun, 7 Mar 2010 04:13:48 +0000 (04:13 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Sun, 7 Mar 2010 04:13:48 +0000 (04:13 +0000)
Lib/test/test_urllib2.py
Lib/urllib/request.py

index 3e0a107da11041daa29d3fc3d8e1d07aa66dc342..f0297a55370f9ff983135b61a04bb7400b17ac99 100644 (file)
@@ -1220,7 +1220,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/",
index 47fe75e7cf15ee6889f543bdb8f1aa43e661d329..d1d12e65695104448128fb4a8cd1120e52885802 100644 (file)
@@ -192,9 +192,6 @@ 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):