From 2cfd39dbdef227aa74da620859083f505c523f07 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@pinebook-pro" Date: Fri, 24 Apr 2020 09:54:03 +0200 Subject: [PATCH] Fix do_install for missing keys, rearrange lines in conf --- install.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/install.py b/install.py index a6fe101..52a2841 100755 --- a/install.py +++ b/install.py @@ -119,14 +119,25 @@ class Installer: if not packages: try: - packages = tuple( - os_specific_packages[self.operating_system] - + os_specific_packages["both"] - ) + # dict only contains os-specific packages + if "both" not in os_specific_packages.keys(): + packages = tuple( + os_specific_packages[self.operating_system] + ) + # some packages for other operating systems are in the dict + elif self.operating_system not in os_specific_packages.keys(): + packages = tuple( + os_specific_packages["both"] + ) + # dict contains specific and non-specific packages + else: + packages = tuple( + os_specific_packages[self.operating_system] + + os_specific_packages["both"] + ) except KeyError: - ui.fatal("Operating System not understood.") - return + ui.warning("No packages for {}".format(self.operating_system)) failed_installs = []