diff --git a/subiquity/controllers/installprogress.py b/subiquity/controllers/installprogress.py index 5486a719..6f6c411b 100644 --- a/subiquity/controllers/installprogress.py +++ b/subiquity/controllers/installprogress.py @@ -90,19 +90,11 @@ class InstallProgressController(BaseController): def curtin_error(self): log.debug('curtin_error') - # just the last ten lines - errmsg = str(self.curtin_tail_install_log()[-800:]) - # Holy Unescaping Batman! - errmsg = errmsg.replace("\\\'", "") - errmsg = errmsg.replace("\'\'", "") - errmsg = errmsg.replace("\\n\'\n", "\n") - errmsg = errmsg.replace('\\n', '\n') - log.error(errmsg) title = ('An error occurred during installation') self.ui.set_header(title, 'Please report this error in Launchpad') - self.progress_view.set_error(errmsg) + self.progress_view.set_status("An error has occurred") self.ui.set_footer("An error has occurred.", 100) - self.progress_view.show_finished_button() + self.progress_view.show_complete() log.debug('curtin_error: refreshing final error screen') self.signal.emit_signal('refresh') diff --git a/subiquity/ui/views/installprogress.py b/subiquity/ui/views/installprogress.py index 034cb3e4..201426e4 100644 --- a/subiquity/ui/views/installprogress.py +++ b/subiquity/ui/views/installprogress.py @@ -33,11 +33,9 @@ class ProgressView(BaseView): def __init__(self, model, controller): self.model = model self.controller = controller - self.error = Text("") self.listwalker = SimpleListWalker([]) self.linebox = LineBox(ListBox(self.listwalker)) body = [ - ('pack', Padding.center_79(self.error)), ('pack', Text("")), ('weight', 1, Padding.center_79(self.linebox)), ('pack', Text("")), @@ -46,9 +44,8 @@ class ProgressView(BaseView): super().__init__(self.pile) def add_log_tail(self, text): - if text.endswith('\n'): - text = text[:-1] - self.listwalker.append(Text(text)) + for line in text.splitlines(): + self.listwalker.append(Text(line)) self.listwalker.set_focus(len(self.listwalker) - 1) def clear_log_tail(self): @@ -57,9 +54,6 @@ class ProgressView(BaseView): def set_status(self, text): self.linebox.set_title(text) - def set_error(self, text): - self.error.set_text(text) - def show_complete(self): w = Padding.fixed_20( Color.button(confirm_btn(label="Reboot now",