Forgot an import, as well as made BlockDevice() have less verbose output on json.dumps.
This commit is contained in:
parent
3d4eaec466
commit
fa4be63e48
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import archinstall, getpass, time, json
|
||||
import archinstall
|
||||
import getpass, time, json, sys
|
||||
|
||||
def perform_installation(device, boot_partition, language, mirrors):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue