Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: build/android/pylib/android_commands.py

Issue 11230057: Move pexpect try-except to pexpect wrapper file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/pylib/pexpect.py » ('j') | build/android/pylib/pexpect.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 """Provides an interface to communicate with the device via the adb command. 5 """Provides an interface to communicate with the device via the adb command.
6 6
7 Assumes adb binary is currently on system path. 7 Assumes adb binary is currently on system path.
8 """ 8 """
9 9
10 import collections 10 import collections
11 import datetime 11 import datetime
12 import logging 12 import logging
13 import os 13 import os
14 import re 14 import re
15 import shlex 15 import shlex
16 import subprocess 16 import subprocess
17 import sys 17 import sys
18 import tempfile 18 import tempfile
19 import time 19 import time
20 20
21 import io_stats_parser 21 import io_stats_parser
22 # pexpect is not available on all platforms. We allow this file to be imported 22 from pylib import pexpect
23 # on platforms without pexpect and only fail when pexpect is actually used.
24 try:
25 from pylib import pexpect
26 except:
27 pexpect = None
28 23
29 CHROME_SRC = os.path.join( 24 CHROME_SRC = os.path.join(
30 os.path.abspath(os.path.dirname(__file__)), '..', '..', '..') 25 os.path.abspath(os.path.dirname(__file__)), '..', '..', '..')
31 26
32 sys.path.append(os.path.join(CHROME_SRC, 'third_party', 'android_testrunner')) 27 sys.path.append(os.path.join(CHROME_SRC, 'third_party', 'android_testrunner'))
33 import adb_interface 28 import adb_interface
34 29
35 import cmd_helper 30 import cmd_helper
36 import errors # is under ../../../third_party/android_testrunner/errors.py 31 import errors # is under ../../../third_party/android_testrunner/errors.py
37 32
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 def __init__(self, output): 1062 def __init__(self, output):
1068 self._output = output 1063 self._output = output
1069 1064
1070 def write(self, data): 1065 def write(self, data):
1071 data = data.replace('\r\r\n', '\n') 1066 data = data.replace('\r\r\n', '\n')
1072 self._output.write(data) 1067 self._output.write(data)
1073 1068
1074 def flush(self): 1069 def flush(self):
1075 self._output.flush() 1070 self._output.flush()
1076 1071
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/pexpect.py » ('j') | build/android/pylib/pexpect.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698