From 650074b0234bfad4cd79f2b0ce37a9a87472faf3 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 9 May 2022 17:53:20 +0000 Subject: [PATCH] unattended: Show a success message at the end of the process Signed-off-by: Michael Tremer --- src/python/step.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/python/step.py b/src/python/step.py index 7554d61..9af20b3 100644 --- a/src/python/step.py +++ b/src/python/step.py @@ -155,24 +155,30 @@ class Welcome(InteractiveStep): os.environ["LANGUAGE"] = lang -class Congratulations(InteractiveStep): +class Congratulations(Step): """ Shows a message that the installation is complete """ first_install = True def run(self): - self.tui.message( - _("Congratulations"), - _( + if self.bricklayer.unattended: + message = _("The unattended installation process has been completed.") + else: + message = _( "The installation has been completed successfully." "\n\n" "You can now safely remove any media used for the installation." - ), - buttons=[_("Finish")], + ) + + self.tui.message( + _("Congratulations"), message, buttons=[_("Finish")], # Make the window a litte bit bigger width=50, + + # Automatically continue in unattended mode + timeout=10 if self.bricklayer.unattended else None, ) @@ -183,8 +189,6 @@ class UnattendedWarning(UnattendedStep): message = _( "The unattended installation will start in %(timeout)s seconds using %(disks)s", - "The unattended installation will start in %(timeout)s seconds using %(disks)s", - len(disks), ) % { "timeout" : timeout, "disks" : i18n.list(disks), -- 2.47.2