]> granicus.if.org Git - python/commitdiff
Reverting the changes made in r78432. Discussed in the tracker issue7540.
authorSenthil Kumaran <orsenthil@gmail.com>
Thu, 4 Mar 2010 15:15:37 +0000 (15:15 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Thu, 4 Mar 2010 15:15:37 +0000 (15:15 +0000)
Lib/test/test_urllib2.py
Lib/urllib2.py

index 4ea6b262290d630757e3fff49e563261720b1934..c911c9d2c074274248402882bfe470d9b4e527c6 100644 (file)
@@ -1209,7 +1209,6 @@ class RequestTests(unittest.TestCase):
         self.get.add_data("spam")
         self.assert_(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 93722691151f00d53002aa29482b13380c667d89..b416913f49292c274a52009295dc6eced82758a9 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):