Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 7cd8dd0f..b11f2318 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -25,6 +25,16 @@ class BlockDevice():
raise KeyError(f'{self} does not contain information: "{key}"')
return self.info[key]
+ def json(self):
+ """
+ json() has precedence over __dump__, so this is a way
+ to give less/partial information for user readability.
+ """
+ return {
+ 'path' : self.path,
+ 'size' : self.info['size'] if 'size' in self.info else '<unknown>'
+ }
+
def __dump__(self):
return {
'path' : self.path,