This repository was archived by the owner on Jan 31, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -587,9 +587,9 @@ def is_lvm(partitions):
587587 partition_info [partition ] = properties
588588
589589 for partition , properties in partition_info .items ():
590- if properties .get ("ID_FS_TYPE" ) == "LVM2_member" :
590+ if properties .get ("ID_FS_TYPE" , "" ) == "LVM2_member" :
591591 lvm_partitions .add (partition )
592- if "LVM2" in properties .get ("ID_FS_VERSION" ):
592+ if "LVM2" in properties .get ("ID_FS_VERSION" , "" ):
593593 lvm_partitions .add (partition )
594594
595595 return lvm_partitions
Original file line number Diff line number Diff line change @@ -1029,9 +1029,10 @@ def test_rhel_found_via_release_file_on_lvm(
10291029PTUUID=98a48d3a
10301030PTTYPE=dos
10311031"""
1032- mock_udevadm .return_value = """ID_FS_TYPE=LVM2_member
1033- ID_FS_VERSION=LVM2 001
1034- """
1032+ mock_udevadm_output1 = """ID_FS_VERSION=LVM2 001\n """
1033+ mock_udevadm_output2 = """ID_FS_TYPE=LVM2_member\n """
1034+
1035+ mock_udevadm .side_effect = [mock_udevadm_output1 , mock_udevadm_output2 ]
10351036 lv_path = "./dev/mapper/rhel_vg-rhel_lv"
10361037 mock_tail .return_value = [lv_path ]
10371038 mock_subprocess_check_output .return_value = RPM_RESULT_NONE
You can’t perform that action at this time.
0 commit comments