We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 712224e commit 6826810Copy full SHA for 6826810
pytest_localserver/smtp.py
@@ -130,7 +130,11 @@ def stop(self, timeout=None):
130
# be called more than once safely
131
# - It passes the timeout argument to Thread.join()
132
if self.loop.is_running():
133
- self.loop.call_soon_threadsafe(self.cancel_tasks)
+ try:
134
+ self.loop.call_soon_threadsafe(self.cancel_tasks)
135
+ except AttributeError:
136
+ # for aiosmtpd < 1.4.3
137
+ self.loop.call_soon_threadsafe(self._stop)
138
if self._thread is not None:
139
self._thread.join(timeout)
140
self._thread = None
0 commit comments