do not run the urwid loop at all when not interactive
This commit is contained in:
parent
45009e3a12
commit
aa3bce4414
|
@ -195,6 +195,7 @@ class Subiquity(TuiApplication):
|
|||
def restart(self, remove_last_screen=True):
|
||||
if remove_last_screen:
|
||||
self._remove_last_screen()
|
||||
if self.urwid_loop is not None:
|
||||
self.urwid_loop.screen.stop()
|
||||
cmdline = ['snap', 'run', 'subiquity']
|
||||
if self.opts.dry_run:
|
||||
|
@ -276,7 +277,9 @@ class Subiquity(TuiApplication):
|
|||
await self.load_autoinstall_config()
|
||||
if not self.interactive() and not self.opts.dry_run:
|
||||
open('/run/casper-no-prompt', 'w').close()
|
||||
await super().start()
|
||||
await super().start(start_urwid=self.interactive())
|
||||
if not self.interactive():
|
||||
self.select_initial_screen(0)
|
||||
|
||||
def extra_urwid_loop_args(self):
|
||||
return dict(input_filter=self.input_filter.filter)
|
||||
|
|
|
@ -267,8 +267,9 @@ class TuiApplication(Application):
|
|||
controller_index = i
|
||||
return controller_index
|
||||
|
||||
async def start(self):
|
||||
async def start(self, start_urwid=True):
|
||||
await super().start()
|
||||
if start_urwid:
|
||||
self.start_urwid()
|
||||
|
||||
def run(self):
|
||||
|
|
Loading…
Reference in New Issue