]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix #9412: make list of messages an instance attribute instead of class attribute.
authorGeorg Brandl <georg@python.org>
Thu, 29 Jul 2010 13:19:42 +0000 (13:19 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 29 Jul 2010 13:19:42 +0000 (13:19 +0000)
Lib/test/test_smtpd.py

index 2d622392fcfe68c12e66f6526714e2fae6ef5b52..538525b5a3d979f583266ee95aae817a93d80ed5 100644 (file)
@@ -42,7 +42,9 @@ class DummySocket:
         pass
 
 class DummyServer(smtpd.SMTPServer):
-    messages = []
+    def __init__(self, *args):
+        smtpd.SMTPServer.__init__(self, *args)
+        self.messages = []
     def create_socket(self, family, type):
         self.family_and_type = (socket.AF_INET, socket.SOCK_STREAM)
         self.set_socket(DummySocket())