]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
adds handle_error(self):raise to test modules using asyncore to provide a clearer...
authorGiampaolo Rodolà <g.rodola@gmail.com>
Thu, 6 May 2010 20:19:32 +0000 (20:19 +0000)
committerGiampaolo Rodolà <g.rodola@gmail.com>
Thu, 6 May 2010 20:19:32 +0000 (20:19 +0000)
Lib/test/test_ftplib.py
Lib/test/test_smtplib.py

index 3a2ec5e84b103ce34ee1bb6a231c07780b390f97..7a0945f85947568acd645541f14e6fd0d766da8f 100644 (file)
@@ -48,6 +48,9 @@ class DummyDTPHandler(asynchat.async_chat):
             self.close()
             self.dtp_conn_closed = True
 
+    def handle_error(self):
+        raise
+
 
 class DummyFTPHandler(asynchat.async_chat):
 
index b74fa407dd7d09bd0ace3d84712b9e04fa2aeb49..42a10bee1d53da807cdaf8953e212e9f501c8798 100644 (file)
@@ -366,6 +366,9 @@ class SimSMTPChannel(smtpd.SMTPChannel):
         else:
             self.push('550 No access for you!')
 
+    def handle_error(self):
+        raise
+
 
 class SimSMTPServer(smtpd.SMTPServer):
 
@@ -384,6 +387,9 @@ class SimSMTPServer(smtpd.SMTPServer):
     def add_feature(self, feature):
         self._extra_features.append(feature)
 
+    def handle_error(self):
+        raise
+
 
 # Test various SMTP & ESMTP commands/behaviors that require a simulated server
 # (i.e., something with more features than DebuggingServer)