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

index 080c2f1f492f81459e786eaa58cc5733af41ef2b..11848e07e47b8c491a2b00489fa4b5f1e927047c 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 5bdc103563edfc4f9a5d712553860c2cef431ca1..b9de4793b3de61dea51ab353675e50a3d249eb36 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):