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

index ef59cfa798c2572c2aec113e13944b49831f0a5b..c0366dd18fcc55c2ff4e8e3915e617a0e1fcff3d 100644 (file)
@@ -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/",
index 8b26971757d3733f10447f4642d13ec64e00b5f4..122f777ce4a393e12d521ce7b846eb1c78229127 100644 (file)
@@ -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):