diff options
author | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 21:58:45 +0000 |
---|---|---|
committer | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 21:58:45 +0000 |
commit | 9b2055b9a1984fb16582fd78f1c6610683b62bfd (patch) | |
tree | 2a1503a152270d1aac2e8d62a41f9969be8957e5 /build | |
parent | 727307e538097c1ea503b83d31142e91a6a76d00 (diff) | |
download | chromium_src-9b2055b9a1984fb16582fd78f1c6610683b62bfd.zip chromium_src-9b2055b9a1984fb16582fd78f1c6610683b62bfd.tar.gz chromium_src-9b2055b9a1984fb16582fd78f1c6610683b62bfd.tar.bz2 |
In android_commands.py, surround pexpect import in try-except.
This allows Chrome Remote Control to import this file on platforms like Windows
where pexpect is not available. This works because it never calls the methods
that actually use pexpect.
Example failure:
http://build.chromium.org/p/chromium.perf/builders/Win7%20GPU%20%28Nvidia%29%20Perf/builds/5757/steps/scrolling_benchmark/logs/stdio
BUG=154343
TEST=Manual
Review URL: https://codereview.chromium.org/11234043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/android/pylib/android_commands.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py index 8a1562c..4eae1b7 100644 --- a/build/android/pylib/android_commands.py +++ b/build/android/pylib/android_commands.py @@ -19,7 +19,12 @@ import tempfile import time import io_stats_parser -from pylib import pexpect +# pexpect is not available on all platforms. We allow this file to be imported +# on platforms without pexpect and only fail when pexpect is actually used. +try: + from pylib import pexpect +except: + pexpect = None CHROME_SRC = os.path.join( os.path.abspath(os.path.dirname(__file__)), '..', '..', '..') |