mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Optimize color stripping function a bit
This commit is contained in:
parent
5329d7503e
commit
ef78287a70
1 changed files with 5 additions and 1 deletions
|
@ -103,7 +103,11 @@ debug_level_log = DebugLevel ("LOG")
|
||||||
_escape = re.compile ("\x1b\\[[0-9;]*m")
|
_escape = re.compile ("\x1b\\[[0-9;]*m")
|
||||||
def strip_escape (s):
|
def strip_escape (s):
|
||||||
|
|
||||||
return _escape.sub ("", s)
|
# FIXME: This can be optimized further!
|
||||||
|
|
||||||
|
while "\x1b" in s:
|
||||||
|
s = _escape.sub ("", s)
|
||||||
|
return s
|
||||||
|
|
||||||
def default_log_line_regex_ ():
|
def default_log_line_regex_ ():
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue