Skip to content

Commit

Permalink
fix issue if additionalWildcard is not set (eg. descriptor)
Browse files Browse the repository at this point in the history
  • Loading branch information
janspeller committed May 4, 2022
1 parent 53a8623 commit fb703fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boswatch/wildcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fb703fb

Please sign in to comment.