Skip to content

Commit c7ceb0d

Browse files
author
Michal Hecko
committed
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.
1 parent 3c3421a commit c7ceb0d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def _get_rdlvm_arg_values():
303303
api.current_logger().debug('Collected the following rd.lvm.lv args that are undesired for the squashfs: %s',
304304
rd_lvm_values)
305305

306-
return rd_lvm_values
306+
return tuple(rd_lvm_values)
307307

308308

309309
def construct_cmdline_args_for_livemode():

repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def test_get_rdlvm_arg_values(monkeypatch):
273273

274274
args = addupgradebootentry._get_rdlvm_arg_values()
275275

276-
assert args == ['A', 'B']
276+
assert tuple(args) == ('A', 'B')
277277

278278

279279
def test_get_device_uuid(monkeypatch):

0 commit comments

Comments
 (0)