wilfred-dev / wilfred

🐿️ A CLI for managing game servers using Docker.
https://wilfredproject.org
MIT License
35 stars 2 forks source link

docker.errors.NotFound exception if container crashes too quickly #49

Closed vilhelmprytz closed 4 years ago

vilhelmprytz commented 4 years ago

Environment

Steps to Reproduce

Create a server that is certain to immediately crash after server start. Start it with wilfred start <name> --console.

Expected Behavior

A "server not running" error to be printed.

Observed Behavior

A long docker.errors.NotFound exception traceback is printed. This is because there is a slight delay between the statement that checks if the server is running and the statement that retrieves the container logs. Perhaps a try-except statement can be added to the container log retrieval as well.