From ca10f0e91ad70da69f3d4ef246763f00fdc7b300 Mon Sep 17 00:00:00 2001 From: Stefan Hundhammer Date: Wed, 10 May 2023 15:23:12 +0200 Subject: [PATCH 1/2] Ignore closing the context menu (bsc#1211213) --- src/include/s390/dasd/dialogs.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/include/s390/dasd/dialogs.rb b/src/include/s390/dasd/dialogs.rb index 75ea04d0..8529511e 100644 --- a/src/include/s390/dasd/dialogs.rb +++ b/src/include/s390/dasd/dialogs.rb @@ -142,7 +142,14 @@ def action_class_for(action) # @param action [Y2S390::DasdAction] the action to perform # @param selected [Y2S390::DasdsCollection] the collection of DASD devices to work with def run(action, selected) - Object.const_get(action_class_for(action)).run(selected) + return false if action == :cancel # Ignore closing the context menu (bsc#1211213) + + begin + Object.const_get(action_class_for(action)).run(selected) + rescue NameError => e + log.error("No action for #{action}: #{e}") + return false + end end def PerformAction(action) From 3aa139e4c137568354633d7eea5f3ef5988c9bbc Mon Sep 17 00:00:00 2001 From: Stefan Hundhammer Date: Wed, 10 May 2023 15:38:33 +0200 Subject: [PATCH 2/2] Version bump and change log --- package/yast2-s390.changes | 9 +++++++++ package/yast2-s390.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package/yast2-s390.changes b/package/yast2-s390.changes index ced6af1e..7df9823a 100644 --- a/package/yast2-s390.changes +++ b/package/yast2-s390.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed May 10 13:35:34 UTC 2023 - Stefan Hundhammer + +- Prevent crash when the user closes the DASD context menu + without action (bsc#1211213) +- Graceful handling of missing actions in the DASD context menu: + just log an error, don't crash +- 4.5.3 + ------------------------------------------------------------------- Thu Dec 22 12:11:10 UTC 2022 - Knut Anderssen diff --git a/package/yast2-s390.spec b/package/yast2-s390.spec index 7df11318..5f609d22 100644 --- a/package/yast2-s390.spec +++ b/package/yast2-s390.spec @@ -17,7 +17,7 @@ Name: yast2-s390 -Version: 4.5.2 +Version: 4.5.3 Release: 0 Group: System/YaST License: GPL-2.0-only