Skip to content

Commit

Permalink
python3 startswith, endswith needs bytes
Browse files Browse the repository at this point in the history
Convert string to bytes for startswith and endswith in valgring.py
Add debian dependency

Signed-off-by: Thierry <[email protected]>
  • Loading branch information
tfauck committed Jan 13, 2020
1 parent ed0f6f2 commit 0eb4efd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toolchain/valgrind.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setUp(self):

dist = distro.detect()
deps = ['gcc', 'make']
if dist.name == 'Ubuntu':
if dist.name in ['Ubuntu', 'debian']:
deps.extend(['g++'])
# FIXME: "redhat" as the distro name for RHEL is deprecated
# on Avocado versions >= 50.0. This is a temporary compatibility
Expand Down Expand Up @@ -73,7 +73,7 @@ def get_results(self, cmd):
self.sourcedir, extra_args=cmd,
process_kwargs={'ignore_status': True}).stdout
for line in results.splitlines():
if line.startswith('==') and line.endswith('=='):
if line.startswith(b'==') and line.endswith(b'=='):
flag = True
if flag:
summary += '%s\n' % line
Expand Down

0 comments on commit 0eb4efd

Please sign in to comment.