Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/device_model.py
diff options
context:
space:
mode:
authorDaniel Girtler <girtler.daniel@gmail.com>2024-04-16 22:05:19 +1000
committerGitHub <noreply@github.com>2024-04-16 14:05:19 +0200
commitdb798eec717a58538cffb712a6689434333dbd82 (patch)
tree2e9ac45853964730f3fa8bcd0a647d9b29409ace /archinstall/lib/disk/device_model.py
parent8f5bc523db80729901d8179ed30209576a06f4ca (diff)
Fix 2445 - handle no free spaces and deleted parittions (#2448)
Diffstat (limited to 'archinstall/lib/disk/device_model.py')
-rw-r--r--archinstall/lib/disk/device_model.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index f8873495..50de3ebc 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -697,6 +697,10 @@ class PartitionModification:
return hash(self._obj_id)
@property
+ def end(self) -> Size:
+ return self.start + self.length
+
+ @property
def obj_id(self) -> str:
if hasattr(self, '_obj_id'):
return str(self._obj_id)
@@ -827,14 +831,12 @@ class PartitionModification:
"""
Called for displaying data in table format
"""
- end = self.start + self.length
-
part_mod = {
'Status': self.status.value,
'Device': str(self.dev_path) if self.dev_path else '',
'Type': self.type.value,
'Start': self.start.format_size(Unit.sectors, self.start.sector_size, include_unit=False),
- 'End': end.format_size(Unit.sectors, self.start.sector_size, include_unit=False),
+ 'End': self.end.format_size(Unit.sectors, self.start.sector_size, include_unit=False),
'Size': self.length.format_highest(),
'FS type': self.fs_type.value if self.fs_type else 'Unknown',
'Mountpoint': self.mountpoint if self.mountpoint else '',