Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 1793 #1794

Merged
merged 1 commit into from
May 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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