New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FTPServer ctx manager support #463

Closed
giampaolo opened this Issue Apr 27, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@giampaolo
Owner

giampaolo commented Apr 27, 2018

...so that the server class can be used as such:

server = FTPServer(addr, handler)
with server:
    server.serve_forever()

On __exit__ we'll just call close_all().

@giampaolo

This comment has been minimized.

Owner

giampaolo commented Apr 27, 2018

Note: the same has been done for socketserver module:
https://docs.python.org/3/library/socketserver.html

@giampaolo giampaolo closed this in 327f3e0 Apr 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment