diff --git a/.github/workflows/run_pytest.yml b/.github/workflows/run_pytest.yml index 1b12138..30b9fe5 100644 --- a/.github/workflows/run_pytest.yml +++ b/.github/workflows/run_pytest.yml @@ -6,25 +6,29 @@ jobs: build: strategy: - max-parallel: 3 matrix: os: [ubuntu-latest] - python-version: [3.5, 3.6, 3.7] + python-version: [3.5, 3.6, 3.7, 3.8] runs-on: ${{matrix.os}} + steps: - uses: actions/checkout@v1 + - name: Set up Python ${{matrix.python-version}} at ${{matrix.os}} uses: actions/setup-python@v1 with: python-version: ${{matrix.python-version}} + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt mkdir log/ + - name: Test with pytest run: | pytest -c 'test/pytest.ini' + - name: Save artifacts uses: actions/upload-artifact@master with: diff --git a/module/descriptor.py b/module/descriptor.py index 77a28f8..cf17530 100644 --- a/module/descriptor.py +++ b/module/descriptor.py @@ -42,10 +42,10 @@ class BoswatchModule(ModuleBase): @param bwPacket: A BOSWatch packet instance""" for descriptor in self.config: + if not bwPacket.get(descriptor.get("scanField")): + break # scanField is not available in this packet + bwPacket.set(descriptor.get("descrField"), bwPacket.get(descriptor.get("scanField"))) for description in descriptor.get("descriptions"): - if not bwPacket.get(descriptor.get("scanField")): - break # scanField is not available in this packet - bwPacket.set(descriptor.get("descrField"), description.get("for")) if str(description.get("for")) == bwPacket.get(descriptor.get("scanField")): logging.debug("Description '%s' added in packet field '%s'", description.get("add"), descriptor.get("descrField"))