Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions archinstall/lib/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ class _BtrfsSubvolumeInfo:
@dataclass
class _PartitionInfo:
partition: Partition
name: str
name: str | None
type: PartitionType
fs_type: FilesystemType | None
path: Path
Expand All @@ -541,7 +541,6 @@ def table_data(self) -> dict[str, str]:
end = self.start + self.length

part_info = {
'Name': self.name,
'Type': self.type.value,
'Filesystem': self.fs_type.value if self.fs_type else tr('Unknown'),
'Path': str(self.path),
Expand All @@ -551,6 +550,9 @@ def table_data(self) -> dict[str, str]:
'Flags': ', '.join(f.description for f in self.flags),
}

if self.name is not None:
part_info = {'Name': self.name, **part_info}

if self.btrfs_subvol_infos:
part_info['Btrfs vol.'] = f'{len(self.btrfs_subvol_infos)} subvolumes'

Expand Down Expand Up @@ -584,7 +586,7 @@ def from_partition(

return cls(
partition=partition,
name=partition.get_name(),
name=partition.name,
type=partition_type,
fs_type=fs_type,
path=Path(partition.path),
Expand Down
3 changes: 2 additions & 1 deletion stubs/parted/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class Partition:
def disk(self) -> Disk: ...
@property
def path(self) -> str: ...
def get_name(self) -> str: ...
@property
def name(self) -> str | None: ...
def getFlag(self, flag: int) -> int: ...
def setFlag(self, flag: int) -> None: ...
def getLength(self, unit: str = ...) -> int: ...
Expand Down