Skip to content

Commit

Permalink
fix: workaround for some python jank
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed Jan 8, 2024
1 parent 2ffe928 commit daa6afc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ async def get_tab_profiles(self) -> dict[str, list[str]] | None:
while Plugin.users_dict is None:
await asyncio.sleep(0.1)

tab_profiles = Plugin.users_dict[Plugin.user_id]["tabProfiles"]
user = Plugin.users_dict[Plugin.user_id]
tab_profiles = Plugin.users_dict[Plugin.user_id]["tabProfiles"] if "tabProfiles" in user.keys() else {}
log(f"Got tab profiles {tab_profiles}")
return tab_profiles or {}
return tab_profiles

# Plugin settings setters
async def set_tabs(self, tabs: dict[str, dict]):
Expand Down

0 comments on commit daa6afc

Please sign in to comment.