mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
Merge branch 'develop' into descriptor_test
This commit is contained in:
commit
2df5e46104
8
.github/workflows/run_pytest.yml
vendored
8
.github/workflows/run_pytest.yml
vendored
|
|
@ -6,25 +6,29 @@ jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 3
|
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
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}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Set up Python ${{matrix.python-version}} at ${{matrix.os}}
|
- name: Set up Python ${{matrix.python-version}} at ${{matrix.os}}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: ${{matrix.python-version}}
|
python-version: ${{matrix.python-version}}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
mkdir log/
|
mkdir log/
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
pytest -c 'test/pytest.ini'
|
pytest -c 'test/pytest.ini'
|
||||||
|
|
||||||
- name: Save artifacts
|
- name: Save artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,10 @@ class BoswatchModule(ModuleBase):
|
||||||
|
|
||||||
@param bwPacket: A BOSWatch packet instance"""
|
@param bwPacket: A BOSWatch packet instance"""
|
||||||
for descriptor in self.config:
|
for descriptor in self.config:
|
||||||
for description in descriptor.get("descriptions"):
|
|
||||||
if not bwPacket.get(descriptor.get("scanField")):
|
if not bwPacket.get(descriptor.get("scanField")):
|
||||||
break # scanField is not available in this packet
|
break # scanField is not available in this packet
|
||||||
bwPacket.set(descriptor.get("descrField"), description.get("for"))
|
bwPacket.set(descriptor.get("descrField"), bwPacket.get(descriptor.get("scanField")))
|
||||||
|
for description in descriptor.get("descriptions"):
|
||||||
if str(description.get("for")) == bwPacket.get(descriptor.get("scanField")):
|
if str(description.get("for")) == bwPacket.get(descriptor.get("scanField")):
|
||||||
logging.debug("Description '%s' added in packet field '%s'",
|
logging.debug("Description '%s' added in packet field '%s'",
|
||||||
description.get("add"), descriptor.get("descrField"))
|
description.get("add"), descriptor.get("descrField"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue