|
@@ -331,8 +331,8 @@ def console_init(self, timeout = None):
|
|
def console_log(self, text):
|
|
def console_log(self, text):
|
|
for line in re.split("[\r\n]", text):
|
|
for line in re.split("[\r\n]", text):
|
|
# filter out terminal escape sequences
|
|
# filter out terminal escape sequences
|
|
- line = re.sub("\x1b\[[0-9;?]*[a-zA-Z]", "", line)
|
|
|
|
- line = re.sub("\x1b\([0-9;?]*[a-zA-Z]", "", line)
|
|
|
|
|
|
+ line = re.sub("\x1b\\[[0-9;?]*[a-zA-Z]", "", line)
|
|
|
|
+ line = re.sub("\x1b\\([0-9;?]*[a-zA-Z]", "", line)
|
|
# replace unprintable chars
|
|
# replace unprintable chars
|
|
line = re.sub("\x1b", "<esc>", line)
|
|
line = re.sub("\x1b", "<esc>", line)
|
|
line = re.sub("[\x00-\x1f]", ".", line)
|
|
line = re.sub("[\x00-\x1f]", ".", line)
|
|
@@ -530,7 +530,7 @@ def get_qemu_version(qemu_path):
|
|
and return the major number."""
|
|
and return the major number."""
|
|
output = subprocess.check_output([qemu_path, '--version'])
|
|
output = subprocess.check_output([qemu_path, '--version'])
|
|
version_line = output.decode("utf-8")
|
|
version_line = output.decode("utf-8")
|
|
- version_num = re.split(' |\(', version_line)[3].split('.')[0]
|
|
|
|
|
|
+ version_num = re.split(r' |\(', version_line)[3].split('.')[0]
|
|
return int(version_num)
|
|
return int(version_num)
|
|
|
|
|
|
def parse_config(config, args):
|
|
def parse_config(config, args):
|