Chromium Code Reviews| Index: build/android/pylib/android_commands.py |
| diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
| index b8b407333f9a9269d019393abbe9f33758494951..1d93c3e2ac1daebd1f301a7ac6f573bd48dff2a4 100644 |
| --- a/build/android/pylib/android_commands.py |
| +++ b/build/android/pylib/android_commands.py |
| @@ -778,7 +778,7 @@ class AndroidCommands(object): |
| Args: |
| clear: If True the existing logcat output will be cleared, to avoiding |
| matching historical output lurking in the log. |
| - timeout: How long WaitForLogMatch will wait for the given match |
| + timeout: deprecated, don't use (timeout for adb to start). |
|
Peter Beverloo
2013/01/22 02:03:48
nit: s/deprecated/Deprecated/. Parameter explanati
bulach
2013/01/22 02:07:36
Done.
Peter Beverloo
2013/01/22 02:07:41
I see that it is used in the pexpect.spawn() call.
|
| filters: A list of logcat filters to be used. |
| """ |
| if clear: |
| @@ -823,9 +823,11 @@ class AndroidCommands(object): |
| |success_re|. If None is given, no error condition will be detected. |
| clear: If True the existing logcat output will be cleared, defaults to |
| false. |
| + timeout: timeout in seconds to wait for a log match. |
|
Peter Beverloo
2013/01/22 02:03:48
nit: dito on the capital.
bulach
2013/01/22 02:07:36
Done.
|
| Raises: |
| - pexpect.TIMEOUT upon the timeout specified by StartMonitoringLogcat(). |
| + pexpect.TIMEOUT after |timeout| seconds without a match for |success_re| |
| + or |error_re|. |
| Returns: |
| The re match object if |success_re| is matched first or None if |error_re| |
| @@ -840,7 +842,7 @@ class AndroidCommands(object): |
| while True: |
| # Note this will block for upto the timeout _per log line_, so we need |
| # to calculate the overall timeout remaining since t0. |
| - time_remaining = t0 + self._logcat.timeout - time.time() |
| + time_remaining = t0 + timeout - time.time() |
| if time_remaining < 0: raise pexpect.TIMEOUT(self._logcat) |
| self._logcat.expect(PEXPECT_LINE_RE, timeout=time_remaining) |
| line = self._logcat.match.group(1) |