From 8f19ad057c5305c9e24975a4462e80f11c08228a Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Tue, 23 Jun 2020 09:24:40 -0700 Subject: [PATCH] daemon: cleaned up requirement check, updated github workflow to modify correct file --- .github/workflows/daemon-checks.yml | 2 +- daemon/core/emulator/coreemu.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/daemon-checks.yml b/.github/workflows/daemon-checks.yml index 85409568..d955ee58 100644 --- a/.github/workflows/daemon-checks.yml +++ b/.github/workflows/daemon-checks.yml @@ -18,7 +18,7 @@ jobs: cd daemon cp setup.py.in setup.py cp core/constants.py.in core/constants.py - sed -i 's/True/False/g' core/constants.py + sed -i 's/required=True/required=False/g' core/emulator/coreemu.py pipenv sync --dev - name: isort run: | diff --git a/daemon/core/emulator/coreemu.py b/daemon/core/emulator/coreemu.py index 86652013..71723268 100644 --- a/daemon/core/emulator/coreemu.py +++ b/daemon/core/emulator/coreemu.py @@ -79,15 +79,14 @@ class CoreEmu: :return: nothing :raises core.errors.CoreError: when an executable does not exist on path """ - for requirement in COMMON_REQUIREMENTS: - utils.which(requirement, required=True) + requirements = COMMON_REQUIREMENTS use_ovs = self.config.get("ovs") == "True" if use_ovs: - for requirement in OVS_REQUIREMENTS: - utils.which(requirement, required=True) + requirements += OVS_REQUIREMENTS else: - for requirement in VCMD_REQUIREMENTS: - utils.which(requirement, required=True) + requirements += VCMD_REQUIREMENTS + for requirement in requirements: + utils.which(requirement, required=True) def load_services(self) -> None: """