From 1ef59a087fdd4f464ed96d34e92dea0b1aab4d8e Mon Sep 17 00:00:00 2001 From: Jan Pokorny Date: Thu, 8 Aug 2024 10:19:34 +0200 Subject: [PATCH] fixes to previous commit (to be squashed) - removed leftover debug messages from test_fsset.py - removed unused imports from fsset.py - changed variable's names to correct values in root.py --- pyanaconda/modules/storage/devicetree/fsset.py | 7 +++---- pyanaconda/modules/storage/devicetree/root.py | 4 ++-- .../pyanaconda_tests/modules/storage/test_fsset.py | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pyanaconda/modules/storage/devicetree/fsset.py b/pyanaconda/modules/storage/devicetree/fsset.py index cace6f733da5..e09e2e8f708b 100644 --- a/pyanaconda/modules/storage/devicetree/fsset.py +++ b/pyanaconda/modules/storage/devicetree/fsset.py @@ -21,14 +21,13 @@ from blivet import blockdev from blivet.fstab import FSTabManager -from blivet.devices import NoDevice, DirectoryDevice, NFSDevice, FileDevice, MDRaidArrayDevice, \ +from blivet.devices import NoDevice, DirectoryDevice, FileDevice, MDRaidArrayDevice, \ NetworkStorageDevice, OpticalDevice -from blivet.errors import UnrecognizedFSTabEntryError, FSTabTypeMismatchError, SwapSpaceError -from blivet.formats import get_format, get_device_format_class +from blivet.errors import UnrecognizedFSTabEntryError, SwapSpaceError +from blivet.formats import get_format from blivet.storage_log import log_exception_info from pyanaconda.core.configuration.anaconda import conf -from pyanaconda.core.i18n import _ from pyanaconda.modules.storage.platform import platform, EFI from pyanaconda.anaconda_loggers import get_module_logger diff --git a/pyanaconda/modules/storage/devicetree/root.py b/pyanaconda/modules/storage/devicetree/root.py index 63da232ac0ce..375fce8e3f24 100644 --- a/pyanaconda/modules/storage/devicetree/root.py +++ b/pyanaconda/modules/storage/devicetree/root.py @@ -287,8 +287,8 @@ def _parse_fstab(devicetree, chroot): continue # If a btrfs volume is found but a subvolume is expected, ignore the volume. - if device.type == "btrfs volume" and "subvol=" in options: - log.debug("subvolume from %s for %s not found", options, devspec) + if device.type == "btrfs volume" and "subvol=" in entry.mntops: + log.debug("subvolume from %s for %s not found", entry.mntops, entry.spec) continue if entry.vfstype != "swap": diff --git a/tests/unit_tests/pyanaconda_tests/modules/storage/test_fsset.py b/tests/unit_tests/pyanaconda_tests/modules/storage/test_fsset.py index 25794bbbd1ee..057c7003d9f7 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/storage/test_fsset.py +++ b/tests/unit_tests/pyanaconda_tests/modules/storage/test_fsset.py @@ -247,6 +247,3 @@ def test_root_parse_fstab(self): self.assertEqual(mounts["/mnt/testmount"], test_dev) self.assertTrue(test_dev in devices) - - print("MYDEBUG: %s" % mounts) - print("MYDEBUG: %s" % devices)