From ed3b241aace6206c0658befb1e6202fa6e32855c Mon Sep 17 00:00:00 2001 From: Andrey Dubilyer <92729835+bananabr3d@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:44:32 +0100 Subject: [PATCH] Update Client/profile_save.py Co-authored-by: Hauke Platte <53154723+HOOK-Hawkins@users.noreply.github.com> --- Client/profile_save.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Client/profile_save.py b/Client/profile_save.py index 5f3bfc2..88e3625 100644 --- a/Client/profile_save.py +++ b/Client/profile_save.py @@ -26,24 +26,6 @@ def get_profiles(self): else: return None - def get_profile(self, player : Player): - """ - This method returns a profile by its uuid - :param profile_uuid: - :return: profile matching given uuid - """ - player_dict = player.as_dict() - if self.check_file(): - try: - with open(self.path, 'r') as file: - data = json.load(file) - for profile in data: - if profile["uuid"] == player_dict["uuid"]: - return Player.from_dict(profile) - except: - raise RuntimeError("json error: Make sure profiles.json is formatted correctly") - return None - def set_profile(self, player : Player): """ This method sets the profile name and/or color by the uuid