File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 3131from typing import Optional , Any
3232
3333import qubesadmin
34- from qubesadmin .utils .shutdown import shutdown
35- from qubesadmin .utils .start import start
34+ import qubesadmin .utils
3635
3736from qubes_config .widgets .gtk_utils import (
3837 load_icon ,
@@ -315,7 +314,9 @@ async def shutdown_domains(self, to_shutdown):
315314 """
316315 Try to shut down vms and wait to finish.
317316 """
318- failed = await shutdown (domains = to_shutdown , force = True , wait = True )
317+ failed = await qubesadmin .utils .shutdown (
318+ domains = to_shutdown , force = True , wait = True
319+ )
319320 if not failed :
320321 return to_shutdown
321322 self .status = RestartStatus .ERROR_TMPL_DOWN
@@ -334,7 +335,7 @@ async def restart_vms(self, to_restart):
334335 shutdowns = await self .shutdown_domains (to_restart )
335336
336337 # restart shutdown qubes
337- failed = await start (domains = shutdowns )
338+ failed = await qubesadmin . utils . start (domains = shutdowns )
338339 if not failed :
339340 return
340341 for qube , exc in failed .items ():
You can’t perform that action at this time.
0 commit comments