index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-10-18 20:26:09 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-10-18 20:26:09 +0200 |
commit | fa4be63e483a0a692f26103b45ad6abe73879f37 (patch) | |
tree | 2858c3ffd9bada7dfcb14c546a0d5c0cfac28a63 | |
parent | 3d4eaec4662197e15b8f8c05fcefc2a5fa487da5 (diff) |
-rw-r--r-- | archinstall/lib/disk.py | 10 | ||||
-rw-r--r-- | examples/guided.py | 3 |
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, diff --git a/examples/guided.py b/examples/guided.py index 00d2565c..958b1e5f 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -1,4 +1,5 @@ -import archinstall, getpass, time, json +import archinstall +import getpass, time, json, sys def perform_installation(device, boot_partition, language, mirrors): """ |