Skip to content

Commit

Permalink
style: format to please flake8 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Sep 13, 2023
1 parent b92d0d9 commit 066838f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ublue_update/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ def get_active_sessions():
}
session_properties.append(loginctl_output)
for session_info in session_properties:
graphical = (
session_info["Type"] == "x11" or session_info["Type"] == "wayland"
)
graphical = session_info["Type"] == "x11" or session_info["Type"] == "wayland"
if graphical and session_info["Active"] == "yes":
active_sessions.append(session_info)
return active_sessions
Expand All @@ -71,12 +69,12 @@ def notify(title: str, body: str, actions: list = [], urgency: str = "normal"):
try:
users = get_active_sessions()
except KeyError as e:
log.error("failed to get active logind session info", e);
log.error("failed to get active logind session info", e)
for user in users:
try:
xdg_runtime_dir = get_xdg_runtime_dir(user["User"])
except KeyError as e:
log.error(f"failed to get xdg_runtime_dir for user: {user['Name']}", e);
log.error(f"failed to get xdg_runtime_dir for user: {user['Name']}", e)
return
user_args = [
"sudo",
Expand All @@ -103,7 +101,7 @@ def ask_for_updates():
["universal-blue-update-confirm=Confirm"],
"critical",
)
if out == None:
if out is None:
return
# if the user has confirmed
if "universal-blue-update-confirm" in out.stdout.decode("utf-8"):
Expand Down Expand Up @@ -225,6 +223,7 @@ def run_updates(args):

cli_args = None


def main():

# setup argparse
Expand Down

0 comments on commit 066838f

Please sign in to comment.