mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 05:30:44 +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:
parent
75332cf14a
commit
78de479a43
@ -59,7 +59,9 @@ class SystraceCollector(TraceCollector):
|
|||||||
@property
|
@property
|
||||||
@memoized
|
@memoized
|
||||||
def available_categories(self):
|
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 = []
|
categories = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
@ -139,7 +141,8 @@ class SystraceCollector(TraceCollector):
|
|||||||
self._systrace_process = subprocess.Popen(
|
self._systrace_process = subprocess.Popen(
|
||||||
self.systrace_cmd,
|
self.systrace_cmd,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
shell=True
|
shell=True,
|
||||||
|
universal_newlines=True
|
||||||
)
|
)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user