doc: remove usage of sre_constants in filter-known-issues.py
sre_constants is an undocumented module that deprecated in python 3.11. The sre_constants.error exception is also exposed through re.error, this documented one should be used instead. Tracked-On: #8425 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
24af8011c9
commit
0d9b08633d
|
@ -36,7 +36,6 @@ import logging
|
||||||
import mmap
|
import mmap
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sre_constants
|
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
@ -69,7 +68,7 @@ def config_import_file(filename):
|
||||||
regex = gd['regex']
|
regex = gd['regex']
|
||||||
try:
|
try:
|
||||||
r = re.compile(regex, re.MULTILINE)
|
r = re.compile(regex, re.MULTILINE)
|
||||||
except sre_constants.error as e:
|
except re.error as e:
|
||||||
logging.error("%s: bytes %d-%d: bad regex: %s",
|
logging.error("%s: bytes %d-%d: bad regex: %s",
|
||||||
filename, m.start(), m.end(), e)
|
filename, m.start(), m.end(), e)
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue