Merge pull request #215 from insanemal/newline-fix

Fix newline issue on fstab writes
This commit is contained in:
Anton Hvornum 2021-04-07 07:22:46 +00:00 committed by GitHub
commit 1d60e307e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class Installer():
self.log(f"Updating {self.mountpoint}/etc/fstab", level=LOG_LEVELS.Info)
fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log
with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh:
with open(f"{self.mountpoint}/etc/fstab", 'ab',newline='\n') as fstab_fh:
fstab_fh.write(fstab)
if not os.path.isfile(f'{self.mountpoint}/etc/fstab'):