remove ansi escape from output

This commit is contained in:
JerryXiao 2022-12-05 20:51:18 +08:00
parent eebd1b2bdf
commit cd64807a39
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5

View file

@ -128,6 +128,7 @@ def execute_with_io(command: List[str], timeout: int = 3600, interactive: bool =
raise
if (ret := p.wait()) != 0:
raise subprocess.CalledProcessError(ret, command, output)
output = ANSI_ESCAPE.sub('', output)
return output.split('\n')
def pacman_time_to_timestamp(stime: str) -> int: