From 22fce6e78186e5fb6dbb93a76b3305ddb3ea1edf Mon Sep 17 00:00:00 2001 From: MAL Date: Mon, 25 Sep 2023 16:09:26 +0200 Subject: [PATCH] fix vpc --- osc_tui/mainForm.py | 6 +++--- osc_tui/popup.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/osc_tui/mainForm.py b/osc_tui/mainForm.py index 22e377d..631b86f 100644 --- a/osc_tui/mainForm.py +++ b/osc_tui/mainForm.py @@ -181,10 +181,10 @@ def actionHighlighted(self, act_on_this, key_press): elif MODE == 'Nets': if act_on_this == 'Create new': self.form.parentApp.addForm( - "CREATE_VPCs", - createVpcs.createVpcs, + "CREATE_VPCS", + createVpcs.CreateVpcs, name="osc-tui") - self.form.parentApp.switchForm("CREATE_VPCs") + self.form.parentApp.switchForm("CREATE_VPCS") return elif MODE == 'Images': if act_on_this == 'Filter': diff --git a/osc_tui/popup.py b/osc_tui/popup.py index 1a21981..b2aaaf3 100644 --- a/osc_tui/popup.py +++ b/osc_tui/popup.py @@ -1084,3 +1084,18 @@ def ok(): F.on_ok = ok F.edit() + +def errorPopup(message): + F = displayPopup(name = "Error") + F.preserve_selected_widget = True + + ft = F.add_widget( + oscscreen.Pager, + ) + ft.values = [message] + + def ok(): + exit() + + F.on_ok = ok + F.edit()