Fix systrace when parsing from a trace file
Change-Id: Iefc5c5dcb3bc1886c7a660b06e715868c91bafbd
diff --git a/systrace.py b/systrace.py
index 71d3a55..621b0e8 100755
--- a/systrace.py
+++ b/systrace.py
@@ -37,7 +37,7 @@
action='store_true', help='link to original CSS or JS resources '
'instead of embedding them')
parser.add_option('--from-file', dest='from_file', action='store',
- help='read the trace from a file rather than running a live trace')
+ help='read the trace from a file (compressed) rather than running a live trace')
parser.add_option('--asset-dir', dest='asset_dir', default='trace-viewer',
type='string', help='')
parser.add_option('-e', '--serial', dest='device_serial', type='string',
@@ -103,8 +103,7 @@
sys.stderr.flush()
if adb.stdout in ready[0]:
out = leftovers + os.read(adb.stdout.fileno(), 4096)
- if options.from_file is None:
- out = out.replace('\r\n', '\n')
+ out = out.replace('\r\n', '\n')
if out.endswith('\r'):
out = out[:-1]
leftovers = '\r'