From da59378cc45b1d04e0b26d058d451a9202903d1c Mon Sep 17 00:00:00 2001 From: Varun Madiath Date: Mon, 19 Oct 2020 21:30:51 -0400 Subject: Fix typos. --- archinstall/__main__.py | 2 +- archinstall/lib/general.py | 11 ++++++----- archinstall/lib/installer.py | 16 +++++++++------- archinstall/lib/user_interaction.py | 4 ++-- 4 files changed, 18 insertions(+), 15 deletions(-) (limited to 'archinstall') diff --git a/archinstall/__main__.py b/archinstall/__main__.py index fd536258..6cd9d482 100644 --- a/archinstall/__main__.py +++ b/archinstall/__main__.py @@ -21,7 +21,7 @@ def find_examples(): def run_as_a_module(): """ - Ssince we're running this as a 'python -m archinstall' module OR + Since we're running this as a 'python -m archinstall' module OR a nuitka3 compiled version of the project. This function and the file __main__ acts as a entry point. """ diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index ff834241..2dd3e5ab 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -100,9 +100,9 @@ class sys_command():#Thread): self.exec_dir = f'{self.cwd}/{os.path.basename(self.cmd[0])}_workingdir' if not self.cmd[0][0] == '/': - # "which" doesn't work as it's a builin to bash. + # "which" doesn't work as it's a builtin to bash. # It used to work, but for whatever reason it doesn't anymore. So back to square one.. - + #log('Worker command is not executed with absolute path, trying to find: {}'.format(self.cmd[0]), origin='spawn', level=5) #log('This is the binary {} for {}'.format(o.decode('UTF-8'), self.cmd[0]), origin='spawn', level=5) self.cmd[0] = locate_binary(self.cmd[0]) @@ -247,9 +247,10 @@ class sys_command():#Thread): with open(f'{self.cwd}/trace.log', 'wb') as fh: fh.write(self.trace_log) -def prerequisit_check(): - if not os.path.isdir('/sys/firmware/efi'): - raise RequirementError('Archinstall only supports machines in UEFI mode.') + +def prerequisite_check(): + if not os.path.isdir("/sys/firmware/efi"): + raise RequirementError("Archinstall only supports machines in UEFI mode.") return True diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index e6c2e300..99d8f2b9 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -137,12 +137,14 @@ class Installer(): if self.partition.filesystem == 'btrfs': #if self.partition.encrypted: self.base_packages.append('btrfs-progs') - + self.pacstrap(self.base_packages) self.genfstab() - with open(f'{self.mountpoint}/etc/fstab', 'a') as fstab: - fstab.write('\ntmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0\n') # Redundant \n at the start? who knoes? + with open(f"{self.mountpoint}/etc/fstab", "a") as fstab: + fstab.write( + "\ntmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0\n" + ) # Redundant \n at the start? who knows? ## TODO: Support locale and timezone #os.remove(f'{self.mountpoint}/etc/localtime') @@ -182,7 +184,7 @@ class Installer(): entry.write('initrd /initramfs-linux.img\n') ## blkid doesn't trigger on loopback devices really well, ## so we'll use the old manual method until we get that sorted out. - + if self.partition.encrypted: for root, folders, uids in os.walk('/dev/disk/by-uuid'): @@ -191,7 +193,7 @@ class Installer(): if not os.path.basename(real_path) == os.path.basename(self.partition.real_device): continue entry.write(f'options cryptdevice=UUID={uid}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n') - + self.helper_flags['bootloader'] = True return True break @@ -202,7 +204,7 @@ class Installer(): if not os.path.basename(real_path) == os.path.basename(self.partition.path): continue entry.write(f'options root=PARTUUID={uid} rw intel_pstate=no_hwp\n') - + self.helper_flags['bootloader'] = True return True break @@ -228,7 +230,7 @@ class Installer(): o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} useradd -m -G wheel {user}')) if password: self.user_set_pw(user, password) - + if groups: for group in groups: o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} gpasswd -a {user} {group}')) diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 0d3a12f5..29dfaed2 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -170,7 +170,7 @@ def select_mirror_regions(mirrors, show_top_mirrors=True): :rtype: dict """ - # TODO: Support multiple options and country ycodes, SE,UK for instance. + # TODO: Support multiple options and country codes, SE,UK for instance. regions = sorted(list(mirrors.keys())) selected_mirrors = {} @@ -205,7 +205,7 @@ def select_mirror_regions(mirrors, show_top_mirrors=True): selected_mirrors[selected_mirror] = mirrors[selected_mirror] else: RequirementError("Selected region does not exist.") - + return selected_mirrors raise RequirementError("Selecting mirror region require a least one region to be given as an option.") \ No newline at end of file -- cgit v1.2.3-70-g09d2