From 21cfe5708cc4864d708fa39c2634d766d92c2a03 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 7 Dec 2020 20:36:06 +0100 Subject: Fixing a strip glitch in `sys_command()` causing certain output to get truncated in unwanted places (like fstab) --- archinstall/lib/general.py | 2 +- archinstall/lib/installer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 6abef205..203f5fa9 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -171,7 +171,7 @@ class sys_command():#Thread): while alive and not self.kwargs['emulate']: for fileno, event in poller.poll(0.1): try: - output = os.read(child_fd, 8192).strip() + output = os.read(child_fd, 8192) self.trace_log += output except OSError: alive = False diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 889f72d9..5827078c 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -121,7 +121,7 @@ class Installer(): fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log print(fstab) with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh: - fstab.write(fstab) + fstab_fh.write(fstab) if not os.path.isfile(f'{self.mountpoint}/etc/fstab'): raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{o}') -- cgit v1.2.3-70-g09d2