diff --git a/.github/workflows/run_pytest.yml b/.github/workflows/run_pytest.yml index 69d1a7d..9ed7032 100644 --- a/.github/workflows/run_pytest.yml +++ b/.github/workflows/run_pytest.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, 3.10.2] runs-on: ${{matrix.os}} steps: diff --git a/boswatch/wildcard.py b/boswatch/wildcard.py index 3519502..3c7debd 100644 --- a/boswatch/wildcard.py +++ b/boswatch/wildcard.py @@ -97,8 +97,9 @@ def replaceWildcards(message, bwPacket): if field is not None: message = message.replace(wildcard, field) - for wildcard, field in _additionalWildcards.items(): + for wildcard, fieldName in _additionalWildcards.items(): + field = bwPacket.get(fieldName) if field is not None: - message = message.replace(wildcard, bwPacket.get(field)) + message = message.replace(wildcard, field) return message