Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Dec 24, 2024
1 parent 83ecb14 commit 5ac587f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/faker_file/tests/sftp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import tempfile
import threading
from asyncio import Semaphore
from contextlib import suppress
from typing import Type

import asyncssh
Expand Down Expand Up @@ -85,10 +86,8 @@ async def start_server_async(
)

async with server:
try:
with suppress(asyncio.CancelledError):
await server.wait_closed()
except asyncio.CancelledError:
pass


def start_server(host: str = SFTP_HOST, port: int = SFTP_PORT) -> None:
Expand Down

0 comments on commit 5ac587f

Please sign in to comment.