Index: build/android/pylib/local/device/local_device_environment.py |
diff --git a/build/android/pylib/local/device/local_device_environment.py b/build/android/pylib/local/device/local_device_environment.py |
index 431614377efa68bd4cffecc6158f13d0d6673965..75d4afe10e35ce0e0c9b9b5f5b8f97ecc67fd722 100644 |
--- a/build/android/pylib/local/device/local_device_environment.py |
+++ b/build/android/pylib/local/device/local_device_environment.py |
@@ -9,6 +9,8 @@ import os |
import shutil |
import tempfile |
import threading |
+import fileinput |
ghost stip (do not use)
2016/07/29 21:56:40
nit: sort all system imports
nicholaslin
2016/07/29 23:54:06
Done.
|
+import sys |
from devil import base_error |
from devil.android import device_blacklist |
@@ -188,6 +190,8 @@ class LocalDeviceEnvironment(environment.Environment): |
try: |
m.Stop() |
m.Close() |
+ for line in fileinput.input([m.output_file], inplace=True): |
ghost stip (do not use)
2016/07/29 21:56:39
cool! didn't know about fileinput
|
+ sys.stdout.write('Device(%s) %s' % (m.adb.GetDeviceSerial(), line)) |
ghost stip (do not use)
2016/07/29 21:56:40
does stdout work here? that is surprising
nicholaslin
2016/07/29 23:54:06
From the local testing I did, yes. inplace=true mo
|
except base_error.BaseError: |
logging.exception('Failed to stop logcat monitor for %s', |
m.adb.GetDeviceSerial()) |