Commit graph

11 commits

Author SHA1 Message Date
KoenigMjr f53102d8c8 Behebung der WARNING "field not found" im Log Bedingt durch die modeunabhängige Verarbeitung sämtlicher Wildcards warnt das Programm, dass manche Felder nicht verfügbar sind, die in der derzeitigen Auswertung jedoch gar nicht vorhanden sein können (z.B. FMS Felder in ZVEI-Datensatz etc.)
Änderungen:
- Wildcard-Ersetzung in `replaceWildcards()` nach Paketmodus (fms, pocsag, zvei, msg) aufgeteilt
- Unnötige Wildcards werden nun abhängig vom Modus nicht mehr verarbeitet
- `{MSG}` wird nun explizit für den Modus `msg` unterstützt
- Kopfzeile mit aktuellem Änderungsdatum versehen
2025-08-08 12:01:41 +02:00
Luflosi d4dcc75711
Avoid "DeprecationWarning: invalid escape sequence"
Without this change, many warnings like this will be generated while running pytest:
```
test/test_template.py:3
  /build/source/test/test_template.py:3: DeprecationWarning: invalid escape sequence '\/'
    """!
```
This can also be seen when manually running python with warnings enabled.

This happens because the comment uses a multiline string and Python interprets the backslash in the logo as an escape character and complains that \/ is not a valid escape sequence. To fix this, prepend the string with the letter r to indicate that the backslash should be treated as a literal character, see https://docs.python.org/3/reference/lexical_analysis.html#index-20.
I also applied this change to all the comment strings since that shouldn't break anything and to establish it as a pattern for the future so this problem hopefully never happens again.

This is what I did specifically:
- Change the comment at the top of bw_client.py and bw_server.py to start with `"""!` since that seems to be the pattern here
- Search-and-Replace all occurances of `"""!` with `r"""!`
- Manually change the strings in `logoToLog()` in boswatch/utils/header.py
2023-09-19 17:49:09 +02:00
Jan Speller 8a1bcebbd9 fix issue if additionalWildcard is not set (eg. descriptor) 2021-03-13 17:41:25 +01:00
Jan Speller 4b0614c7da threads and a few fixes to wildcards 2020-02-24 21:51:19 +01:00
Jan Speller cb64045f32 fix wildcard replacement 2020-02-22 23:47:13 +01:00
Bastian Schroll 3b7847a515
add some documentation 2019-10-26 18:35:31 +02:00
Bastian Schroll 61e085d555
add regexFilter and docs 2019-10-26 13:41:17 +02:00
Bastian Schroll a92dd8d94c
update docs 2019-10-26 10:18:55 +02:00
Bastian Schroll 51e2b1e258
implement registerWildcard() for modules 2019-10-25 21:58:35 +02:00
Bastian Schroll 0c6044072a Merge branch 'develop' into process_manager 2019-09-20 14:54:07 +02:00
Bastian Schroll 4f389723c0 some refactorings 2019-03-11 07:54:11 +01:00
Renamed from boswatch/utils/wildcard.py (Browse further)