Skip to content

Commit

Permalink
Fix 1793 (#1794)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
  • Loading branch information
svartkanin and svartkanin committed May 7, 2023
1 parent eb23b2d commit 525c94b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions archinstall/lib/disk/device_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from parted import ( # type: ignore
Disk, Geometry, FileSystem,
PartitionException, DiskLabelException,
getAllDevices, freshDisk, Partition,
getAllDevices, freshDisk, Partition, Device
)

from .device_model import (
Expand Down Expand Up @@ -103,7 +103,8 @@ def get_device(self, path: Path) -> Optional[BDevice]:
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]:
Expand Down

0 comments on commit 525c94b

Please sign in to comment.