diff --git a/mcstatus/protocol/connection.py b/mcstatus/protocol/connection.py index 140bb078..4f47bc7d 100644 --- a/mcstatus/protocol/connection.py +++ b/mcstatus/protocol/connection.py @@ -220,7 +220,7 @@ def write(self, data: Union[bytes, bytearray]) -> None: def __del__(self): try: self.socket.close() - except: + except Exception: # TODO: Check what this actually excepts pass @@ -257,7 +257,7 @@ def write(self, data: Union[Connection, bytes, bytearray]) -> None: def __del__(self): try: self.socket.close() - except: + except Exception: # TODO: Check what this actually excepts pass @@ -290,7 +290,7 @@ def write(self, data: Union[bytes, bytearray]) -> None: def __del__(self): try: self.writer.close() - except: + except Exception: # TODO: Check what this actually expects pass @@ -328,5 +328,5 @@ async def write(self, data: Union[Connection, bytes, bytearray]) -> None: def __del__(self): try: self.stream.close() - except: + except Exception: # TODO: Check what this actually excepts pass diff --git a/mcstatus/scripts/mcstatus.py b/mcstatus/scripts/mcstatus.py index 006ef293..dd8c3be8 100644 --- a/mcstatus/scripts/mcstatus.py +++ b/mcstatus/scripts/mcstatus.py @@ -99,7 +99,7 @@ def json(): data["host_port"] = query_res.raw["hostport"] data["map"] = query_res.map data["plugins"] = query_res.software.plugins - except: + except Exception: # TODO: Check what this actually excepts pass click.echo(json_dumps(data))