Mercurial > hg
comparison tests/dummysmtpd.py @ 51700:7f0cb9ee0534
Backout accidental publication of a large range of revisions
I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 23 Jul 2024 10:02:46 +0200 |
parents | 8f0b0df79039 |
children | 8fe7c0e1df1e |
comparison
equal
deleted
inserted
replaced
51699:bd1483fd7088 | 51700:7f0cb9ee0534 |
---|---|
29 | 29 |
30 | 30 |
31 def mocksmtpserversession(conn, addr): | 31 def mocksmtpserversession(conn, addr): |
32 conn.send(b'220 smtp.example.com ESMTP\r\n') | 32 conn.send(b'220 smtp.example.com ESMTP\r\n') |
33 | 33 |
34 try: | 34 line = conn.recv(1024) |
35 # Newer versions of OpenSSL raise on EOF | |
36 line = conn.recv(1024) | |
37 except ssl.SSLError: | |
38 log('no hello: EOF\n') | |
39 return | |
40 | |
41 if not line.lower().startswith(b'ehlo '): | 35 if not line.lower().startswith(b'ehlo '): |
42 # Older versions of OpenSSl don't raise | |
43 log('no hello: %s\n' % line) | 36 log('no hello: %s\n' % line) |
44 return | 37 return |
45 | 38 |
46 conn.send(b'250 Hello\r\n') | 39 conn.send(b'250 Hello\r\n') |
47 | 40 |