Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-05-26 19:53:24 +0200
committerGitHub <noreply@github.com>2022-05-26 19:53:24 +0200
commit353c05318ce80b8eec32031c9e14b8471b458548 (patch)
tree43dad6b60b90d128e6e0cca056bd63c57febeca9 /archinstall
parente19ef4463052201ae4635e9dc807fe1fc4d165a3 (diff)
Fix MapperDev.subvolumes (#1249)
* Fixed a silent try/except, and MapperDev.subvolumes should now work. * MapperDev.subvolumes now properly sends a pathlib.Path.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk/btrfs/btrfs_helpers.py4
-rw-r--r--archinstall/lib/disk/mapperdev.py7
2 files changed, 6 insertions, 5 deletions
diff --git a/archinstall/lib/disk/btrfs/btrfs_helpers.py b/archinstall/lib/disk/btrfs/btrfs_helpers.py
index d529478f..d577d82b 100644
--- a/archinstall/lib/disk/btrfs/btrfs_helpers.py
+++ b/archinstall/lib/disk/btrfs/btrfs_helpers.py
@@ -112,8 +112,8 @@ def subvolume_info_from_path(path :pathlib.Path) -> Optional[BtrfsSubvolume]:
return BtrfsSubvolume(**{'full_path' : path, 'name' : subvolume_name, **result})
- except SysCallError:
- pass
+ except SysCallError as error:
+ log(f"Could not retrieve subvolume information from {path}: {error}", level=logging.WARNING, fg="orange")
return None
diff --git a/archinstall/lib/disk/mapperdev.py b/archinstall/lib/disk/mapperdev.py
index 67230012..913dbc13 100644
--- a/archinstall/lib/disk/mapperdev.py
+++ b/archinstall/lib/disk/mapperdev.py
@@ -77,7 +77,8 @@ class MapperDev:
@property
def subvolumes(self) -> Iterator['BtrfsSubvolume']:
from .btrfs import subvolume_info_from_path
-
+
for mountpoint in self.mount_information:
- if subvolume := subvolume_info_from_path(mountpoint):
- yield subvolume \ No newline at end of file
+ if target := mountpoint.get('target'):
+ if subvolume := subvolume_info_from_path(pathlib.Path(target)):
+ yield subvolume \ No newline at end of file