Fixed some stuff

This commit is contained in:
Anton Hvornum 2019-11-17 23:06:09 +00:00
parent 5f256b9e4a
commit 9cd0a4b73f
2 changed files with 6 additions and 2 deletions

View File

@ -216,7 +216,7 @@ class sys_command():#Thread):
if not 'emulate' in kwargs: kwargs['emulate'] = SAFETY_LOCK
#Thread.__init__(self)
if kwargs['emulate']:
print('Starting command in emulation mode.')
print(f"Starting command '{cmd}' in emulation mode.")
self.cmd = shlex.split(cmd)
self.args = args
self.kwargs = kwargs
@ -494,7 +494,10 @@ def get_disk_size(drive):
return ''.join(human_readable_size(fh.read().decode('UTF-8').strip()))
def disk_info(drive, *positionals, **kwargs):
info = json.loads(b''.join(sys_command(f'lsblk -J -o "NAME,SIZE,FSTYPE,LABEL" {drive}', *positionals, **kwargs)).decode('UTF_8'))['blockdevices'][0]
lkwargs = {**kwargs}
lkwargs['emulate'] = False # This is a emulate-safe function. Does not alter filesystem.
info = json.loads(b''.join(sys_command(f'lsblk -J -o "NAME,SIZE,FSTYPE,LABEL" {drive}', *positionals, **lkwargs)).decode('UTF_8'))['blockdevices'][0]
fileformats = []
labels = []
for child in info['children']:

View File

@ -9,5 +9,6 @@ archinstall.setup_args_defaults(archinstall.args, interactive=False)
instructions = archinstall.load_automatic_instructions(emulate=False)
profile_instructions = archinstall.get_instructions('workstation', emulate=False)
profile_instructions = archinstall.merge_in_includes(profile_instructions, emulate=False)
archinstall.args['password'] = 'test'
print(json.dumps(archinstall.args, indent=4))