Added more detail to BlockDevice.__repr__

This commit is contained in:
Anton Hvornum 2021-06-15 11:51:29 +02:00
parent 0079f3d95c
commit 20e759d4cc
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ class BlockDevice:
# I'm placing the encryption password on a BlockDevice level.
def __repr__(self, *args, **kwargs):
return f"BlockDevice({self.device})"
return f"BlockDevice({self.device}, size={self.size}GB, free_space={'+'.join(part[2] for part in self.free_space)}, bus_type={self.bus_type})"
def __iter__(self):
for partition in self.partitions: