Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-07 16:39:25 +1000
committerGitHub <noreply@github.com>2023-05-07 08:39:25 +0200
commit525c94bf36edcc47b9af4d025785ec9681e3aa37 (patch)
treec3a78e8f2084f297472070da932eebc8c2653949
parenteb23b2d7c991829fc1b4c3aa16fc6a6290aef3e0 (diff)
Fix 1793 (#1794)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
-rw-r--r--archinstall/lib/disk/device_handler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
index d4ad9075..13bde77a 100644
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -10,7 +10,7 @@ from typing import List, Dict, Any, Optional, TYPE_CHECKING
from parted import ( # type: ignore
Disk, Geometry, FileSystem,
PartitionException, DiskLabelException,
- getAllDevices, freshDisk, Partition,
+ getAllDevices, freshDisk, Partition, Device
)
from .device_model import (
@@ -103,7 +103,8 @@ class DeviceHandler(object):
def get_device_by_partition_path(self, partition_path: Path) -> Optional[BDevice]:
partition = self.find_partition(partition_path)
if partition:
- return partition.disk.device
+ device: Device = partition.disk.device
+ return self.get_device(Path(device.path))
return None
def find_partition(self, path: Path) -> Optional[_PartitionInfo]: