Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server

Home Page:http://dinnerbone.com/minecraft/tools/status/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If server is off it times out

9ny4 opened this issue · comments

commented

How can i check if the sever is off? if status = server.status() it breaks the rest of the code so it wont get further

Learn basic Python and how exceptions work. "it breaks the rest of the code" because it raises an exception signifying that the server isn't on, you need to catch that exception and handle it properly. https://docs.python.org/3/tutorial/errors.html

I'm going to open an issue about better documentation since that could explain exception handling to the masses.
Edit: #136