From c7ceb0d1045ee18023dd362ee11f20aedf4235c9 Mon Sep 17 00:00:00 2001 From: Michal Hecko Date: Wed, 20 Nov 2024 23:01:32 +0100 Subject: [PATCH] fix(add_upgrade_boot_entry): convert arg list into a tuple Convert collected rd.lvm args into a tuple before trying to make a set with one of the elements being the args. As list is not hashable, this causes the actor to crash. --- .../actors/addupgradebootentry/libraries/addupgradebootentry.py | 2 +- .../addupgradebootentry/tests/unit_test_addupgradebootentry.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py b/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py index b236e39b56..981c9401a7 100644 --- a/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py +++ b/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py @@ -303,7 +303,7 @@ def _get_rdlvm_arg_values(): api.current_logger().debug('Collected the following rd.lvm.lv args that are undesired for the squashfs: %s', rd_lvm_values) - return rd_lvm_values + return tuple(rd_lvm_values) def construct_cmdline_args_for_livemode(): diff --git a/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py b/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py index 2f58ba9edc..717ce15824 100644 --- a/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py +++ b/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py @@ -273,7 +273,7 @@ def test_get_rdlvm_arg_values(monkeypatch): args = addupgradebootentry._get_rdlvm_arg_values() - assert args == ['A', 'B'] + assert tuple(args) == ('A', 'B') def test_get_device_uuid(monkeypatch):