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

module/systrace: Fix subprocess interactions for Python 3

Using 'universal_newlines' gives use pure strings instead of byte
strings
This commit is contained in:
Valentin Schneider 2018-10-19 18:27:11 +01:00 committed by Marc Bonnici
parent 75332cf14a
commit 78de479a43

View File

@ -59,7 +59,9 @@ class SystraceCollector(TraceCollector):
@property
@memoized
def available_categories(self):
lines = subprocess.check_output([self.systrace_binary, '-l']).splitlines()
lines = subprocess.check_output(
[self.systrace_binary, '-l'], universal_newlines=True
).splitlines()
categories = []
for line in lines:
@ -139,7 +141,8 @@ class SystraceCollector(TraceCollector):
self._systrace_process = subprocess.Popen(
self.systrace_cmd,
stdin=subprocess.PIPE,
shell=True
shell=True,
universal_newlines=True
)
def stop(self):