Skip to content

Commit 0848137

Browse files
committed
Cleanup shutdown label initialization
1 parent 98a30cf commit 0848137

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

qui/tray/domains.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,15 @@ def __init__(
203203
icon_name="shutdown",
204204
):
205205
if force:
206-
super().__init__(
207-
vm,
208-
label=force_label or _("Force shutdown"),
209-
icon_cache=icon_cache,
210-
icon_name=icon_name,
211-
)
206+
init_label = force_label or _("Force shutdown")
212207
else:
213-
super().__init__(
214-
vm,
215-
label=label or _("Shutdown"),
216-
icon_cache=icon_cache,
217-
icon_name=icon_name,
218-
)
208+
init_label = label or _("Shutdown")
209+
super().__init__(
210+
vm,
211+
label=init_label,
212+
icon_cache=icon_cache,
213+
icon_name=icon_name,
214+
)
219215
self.force = force
220216
self.follow_shift = follow_shift
221217

0 commit comments

Comments
 (0)