Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nwg-piotr committed May 30, 2024
1 parent aa6a9e4 commit bc22931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nwg_hello/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, client, settings, sessions, x_sessions, users, monitor, voc,
self.sessions = sessions
self.x_sessions = x_sessions # contains session execs, not names
self.test = test
self.cache = cache # store cache with all user sessions for later
self.cache = cache # store cache with all user sessions for later

dir_name = os.path.dirname(__file__)

Expand Down Expand Up @@ -69,7 +69,7 @@ def __init__(self, client, settings, sessions, x_sessions, users, monitor, voc,
for item in settings["custom_sessions"]:
self.combo_session.append(item["exec"], item["name"])
if ("user" and "sessions") in self.cache and \
self.cache["user"] in self.cache["sessions"]:
self.cache["user"] in self.cache["sessions"]:
# preselect the session stored in cache for the last user
self.combo_session.set_active_id(self.cache["sessions"][self.cache["user"]])
else:
Expand Down Expand Up @@ -235,7 +235,7 @@ def login(self, btn):
self.cache["user"] = self.combo_user.get_active_id()
if self.combo_session.get_active_id():
self.cache["sessions"][self.cache["user"]] = self.combo_session.get_active_id()
if self.cache["user"] and self.cache["sessions"][self.cache["user"]]:
if self.cache["user"] and self.cache["sessions"][self.cache["user"]]:
eprint(f"Saving cache: {self.cache}", log=self.log)
# this file belongs to the 'greeter' user
try:
Expand Down

0 comments on commit bc22931

Please sign in to comment.