1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

Merge pull request #184 from setrofim/master

ANSI escape sequences stripping fixes for gem5
This commit is contained in:
setrofim 2017-10-10 08:37:08 +01:00 committed by GitHub
commit dc453ad891
2 changed files with 3 additions and 3 deletions

View File

@ -474,8 +474,8 @@ def which(name):
return None
_bash_color_regex = re.compile('\x1b\\[[0-9;]+m')
# This matches most ANSI escape sequences, not just colors
_bash_color_regex = re.compile(r'\x1b\[[0-9;]*[a-zA-Z]')
def strip_bash_colors(text):
return _bash_color_regex.sub('', text)

View File

@ -444,7 +444,7 @@ class Gem5Connection(TelnetConnection):
self._check_ready()
result = self._gem5_shell("ls {}".format(source))
files = result.split()
files = strip_bash_colors(result).split()
for filename in files:
dest_file = os.path.basename(filename)