File: compat.py

package info (click to toggle)
aiosmtplib 4.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 572 kB
  • sloc: python: 5,516; makefile: 20; sh: 6
file content (8 lines) | stat: -rw-r--r-- 196 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
import asyncio


async def cleanup_server(server: asyncio.AbstractServer) -> None:
    try:
        await asyncio.wait_for(server.wait_closed(), 0.1)
    except asyncio.TimeoutError:
        pass