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

Unified Diff: build/android/pylib/utils/timeout_retry.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/utils/test_environment.py ('k') | build/android/pylib/utils/timeout_retry_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/timeout_retry.py
diff --git a/build/android/pylib/utils/timeout_retry.py b/build/android/pylib/utils/timeout_retry.py
index bc7e891d0b15dd82088911b500d4f788ee7080cf..cdd8b9a593bf5943f748b259b44b4dd3ba267806 100644
--- a/build/android/pylib/utils/timeout_retry.py
+++ b/build/android/pylib/utils/timeout_retry.py
@@ -3,15 +3,15 @@
# found in the LICENSE file.
"""A utility to run functions with timeouts and retries."""
-# pylint: disable=W0702
+import functools
import threading
-from pylib.utils import reraiser_thread
-from pylib.utils import watchdog_timer
+import reraiser_thread
+import watchdog_timer
-def Run(func, timeout, retries, args=None, kwargs=None):
+def Run(func, timeout, retries, args=[], kwargs={}):
"""Runs the passed function in a separate thread with timeouts and retries.
Args:
@@ -24,11 +24,6 @@ def Run(func, timeout, retries, args=None, kwargs=None):
Returns:
The return value of func(*args, **kwargs).
"""
- if not args:
- args = []
- if not kwargs:
- kwargs = {}
-
# The return value uses a list because Python variables are references, not
# values. Closures make a copy of the reference, so updating the closure's
# reference wouldn't update where the original reference pointed.
« no previous file with comments | « build/android/pylib/utils/test_environment.py ('k') | build/android/pylib/utils/timeout_retry_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698