diff --git a/src/treepuncher/treepuncher.py b/src/treepuncher/treepuncher.py index bf81ea8..6a9a029 100644 --- a/src/treepuncher/treepuncher.py +++ b/src/treepuncher/treepuncher.py @@ -239,7 +239,8 @@ class Treepuncher( async def _work(self): try: server_data = await self.info() - self.dispatcher.set_proto(server_data['version']['protocol']) + if "version" in server_data and "protocol" in server_data["version"]: + self.dispatcher.set_proto(server_data['version']['protocol']) except Exception: return self.logger.exception("exception while pinging server") while self._processing: