OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import json | 5 import json |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 import subprocess | 8 import subprocess |
9 import sys | 9 import sys |
10 import tempfile | 10 import tempfile |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 '-dump', f.name], stdout=subprocess.PIPE).communicate()[0] | 181 '-dump', f.name], stdout=subprocess.PIPE).communicate()[0] |
182 except Exception: | 182 except Exception: |
183 pass | 183 pass |
184 if symbolized_stack: | 184 if symbolized_stack: |
185 return symbolized_stack | 185 return symbolized_stack |
186 # Otherwise, just return the last 100 lines of logcat. | 186 # Otherwise, just return the last 100 lines of logcat. |
187 return '\n'.join(self._adb.RunShellCommand('logcat -d -t 100')) | 187 return '\n'.join(self._adb.RunShellCommand('logcat -d -t 100')) |
188 | 188 |
189 def CreateForwarder(self, *port_pairs): | 189 def CreateForwarder(self, *port_pairs): |
190 return adb_commands.Forwarder(self._adb, *port_pairs) | 190 return adb_commands.Forwarder(self._adb, *port_pairs) |
OLD | NEW |