comparison Plugins/WSI/Run.py @ 571:e6cee85fe421

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Jul 2023 17:57:53 +0200
parents 9d41b7f18be8
children 8aa101e126d0
comparison
equal deleted inserted replaced
570:9d41b7f18be8 571:e6cee85fe421
98 if args.valgrind: 98 if args.valgrind:
99 prefix = [ 'valgrind' ] 99 prefix = [ 'valgrind' ]
100 100
101 log = subprocess.check_output(prefix + command, 101 log = subprocess.check_output(prefix + command,
102 stderr=subprocess.STDOUT) 102 stderr=subprocess.STDOUT)
103 103
104 if sys.version_info >= (3, 0):
105 log = log.decode('ascii')
106
104 # If using valgrind, only print the lines from the log starting 107 # If using valgrind, only print the lines from the log starting
105 # with '==' (they contain the report from valgrind) 108 # with '==' (they contain the report from valgrind)
106 if args.valgrind: 109 if args.valgrind:
107 print('\n'.join(filter(lambda x: x.startswith('=='), log.splitlines()))) 110 print('\n'.join(filter(lambda x: x.startswith('=='), log.splitlines())))
108 111