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

Issue 11234043: In android_commands.py, surround pexpect import in try-except. (Closed)

Created:
8 years, 2 months ago by tonyg
Modified:
8 years, 1 month ago
Reviewers:
bulach, Isaac (away)
CC:
chromium-reviews, peter+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy+watch_chromium.org, cmp, nduca, bulach
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=163395

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M build/android/pylib/android_commands.py View 1 chunk +6 lines, -1 line 1 comment Download

Messages

Total messages: 6 (0 generated)
tonyg
8 years, 2 months ago (2012-10-22 21:30:30 UTC) #1
Isaac (away)
Can't we use the pexpect in third_party/pexpect for all platforms?
8 years, 2 months ago (2012-10-22 21:41:15 UTC) #2
tonyg
On 2012/10/22 21:41:15, Isaac wrote: > Can't we use the pexpect in third_party/pexpect for all ...
8 years, 2 months ago (2012-10-22 21:45:21 UTC) #3
Isaac (away)
rietveld breaks buildbot links for fun. lgtm
8 years, 2 months ago (2012-10-22 21:49:06 UTC) #4
bulach
lgtm, but one suggestion: https://codereview.chromium.org/11234043/diff/1/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/11234043/diff/1/build/android/pylib/android_commands.py#newcode23 build/android/pylib/android_commands.py:23: # on platforms without pexpect ...
8 years, 1 month ago (2012-10-23 10:41:25 UTC) #5
tonyg
8 years, 1 month ago (2012-10-23 15:27:57 UTC) #6
On Tue, Oct 23, 2012 at 3:41 AM,  <bulach@chromium.org> wrote:
> lgtm, but one suggestion:
>
>
>
https://codereview.chromium.org/11234043/diff/1/build/android/pylib/android_c...
> File build/android/pylib/android_commands.py (right):
>
>
https://codereview.chromium.org/11234043/diff/1/build/android/pylib/android_c...
> build/android/pylib/android_commands.py:23: # on platforms without
>
> pexpect and only fail when pexpect is actually used.
> nit: nduca added our own wrapper in build/android/pylib/pexpect.py that
> tries to load the module..
> would it work to add the try..except block directly there instead?

Good idea, but I was too quick with the commit button. Made that
change in https://codereview.chromium.org/11230057/ .

>
> https://codereview.chromium.org/11234043/

Powered by Google App Engine
This is Rietveld 408576698