diff --git a/package/yast2-s390.changes b/package/yast2-s390.changes index 16dc53a7..cc78b281 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.6.1 + ------------------------------------------------------------------- Fri Mar 03 14:44:07 UTC 2023 - Ladislav Slezák diff --git a/package/yast2-s390.spec b/package/yast2-s390.spec index 98559be5..b1a7b5ac 100644 --- a/package/yast2-s390.spec +++ b/package/yast2-s390.spec @@ -17,7 +17,7 @@ Name: yast2-s390 -Version: 4.6.0 +Version: 4.6.1 Release: 0 Group: System/YaST License: GPL-2.0-only 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)