diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2025-02-02 10:11:17 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2025-02-02 10:21:23 +0300 |
commit | 637f8bbf610e99859dfbdbde49d99e9c60a7acf7 (patch) | |
tree | 3e685433e89f53a34ca2a4635c29865598d12b4f /contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py | |
parent | bbd3eacdd0520f608b6290efdd0050d7e55ad40d (diff) | |
download | ydb-637f8bbf610e99859dfbdbde49d99e9c60a7acf7.tar.gz |
Intermediate changes
commit_hash:20c3eb2f2d78b5f654ec928c071692413a1bd96d
Diffstat (limited to 'contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py')
-rw-r--r-- | contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py b/contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py index 82dbc394b9..0b285eb10a 100644 --- a/contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py +++ b/contrib/python/pytest-localserver/py3/pytest_localserver/smtp.py @@ -31,7 +31,6 @@ class Handler: class Server(aiosmtpd.controller.Controller): - """ Small SMTP test server. @@ -96,16 +95,7 @@ class Server(aiosmtpd.controller.Controller): @property def accepting(self): - try: - return self.server.is_serving() - except AttributeError: - # asyncio.base_events.Server.is_serving() only exists in Python 3.6 - # and up. For Python 3.5, asyncio.base_events.BaseEventLoop.is_running() - # is a close approximation; it should mostly return the same value - # except for brief periods when the server is starting up or shutting - # down. Once we drop support for Python 3.5, this branch becomes - # unnecessary. - return self.loop.is_running() + return self.server.is_serving() # for aiosmtpd <1.4 if not hasattr(aiosmtpd.controller.Controller, "_trigger_server"): |