diff --git a/CHANGELOG.md b/CHANGELOG.md index b3a1cc88..431e5cb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,17 @@ # Changelog -## --- [4.1.4] - 2023/TBD +## --- [4.2.0] - 2023/TBD ### New features TBD ### Bug fixes - PWA: Removed the custom offline page in favour of browser default ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/607)) - Fix hidden servers appearing visible on public mobile status page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/612)) +- Correctly handle if a server returns a string instead of json data on socket ping ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/614)) +- Bump tornado to resolve #269 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/623)) +### Refactor +TBD ### Tweaks - Polish/Enhance display for InApp Documentation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/613)) +- Add get_users command to Crafty's console ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/620)) ### Lang TBD

diff --git a/app/classes/minecraft/mc_ping.py b/app/classes/minecraft/mc_ping.py index 51fcaa2c..c5cb9916 100644 --- a/app/classes/minecraft/mc_ping.py +++ b/app/classes/minecraft/mc_ping.py @@ -16,6 +16,12 @@ logger = logging.getLogger(__name__) class Server: def __init__(self, data): + if isinstance(data, str): + logger.error( + "Failed to calculate stats. Expected object. " + f"Server returned string: {data}" + ) + return self.description = data.get("description") # print(self.description) if isinstance(self.description, dict): diff --git a/app/classes/shared/command.py b/app/classes/shared/command.py index 26fdd2f0..cebe76b7 100644 --- a/app/classes/shared/command.py +++ b/app/classes/shared/command.py @@ -92,6 +92,9 @@ class MainPrompt(cmd.Cmd): self.controller.users.update_user(user_id, {"password": new_pass}) + def do_get_users(self, _line): + Console.info(self.controller.users.get_all_usernames()) + @staticmethod def do_threads(_line): for thread in threading.enumerate(): diff --git a/requirements.txt b/requirements.txt index 4c182563..4f76592f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ pyjwt==2.4.0 PyYAML==6.0.1 requests==2.31 termcolor==1.1 -tornado==6.3.2 +tornado==6.3.3 tzlocal==4.0 jsonschema==4.5.1 orjson==3.8.12