mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 01:52:56 +01:00
log._clean_str_regex: Fix missing r-qualifier
Fix missing raw string qualifier missing from regex with backslashes. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9dd957c9d3
commit
e071df39ab
1 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ _special_chars = {
|
||||||
_special_char_regex = re.compile("(%s)" % "|".join(map(re.escape, _special_chars.keys())))
|
_special_char_regex = re.compile("(%s)" % "|".join(map(re.escape, _special_chars.keys())))
|
||||||
|
|
||||||
_all_control_chars = ''.join(chr(c) for c in range(sys.maxunicode) if unicodedata.category(chr(c)) in {'Cc'})
|
_all_control_chars = ''.join(chr(c) for c in range(sys.maxunicode) if unicodedata.category(chr(c)) in {'Cc'})
|
||||||
_clean_str_regex = re.compile('(\033\[[0-9]*m|[%s])' % re.escape(_all_control_chars))
|
_clean_str_regex = re.compile(r'(\033\[[0-9]*m|[%s])' % re.escape(_all_control_chars))
|
||||||
|
|
||||||
EMERG = int(syslog.LOG_EMERG)
|
EMERG = int(syslog.LOG_EMERG)
|
||||||
ALERT = int(syslog.LOG_ALERT)
|
ALERT = int(syslog.LOG_ALERT)
|
||||||
|
|
@ -72,7 +72,7 @@ _log_prefix = ''
|
||||||
_clean_log_prefix = ''
|
_clean_log_prefix = ''
|
||||||
_file_name_len = 20
|
_file_name_len = 20
|
||||||
_module_name_len = 50
|
_module_name_len = 50
|
||||||
_log_file_streams = []
|
_log_file_streams: list[io.TextIOWrapper] = []
|
||||||
|
|
||||||
_short_prio_str = {
|
_short_prio_str = {
|
||||||
EMERG : '<Y>',
|
EMERG : '<Y>',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue