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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py
index 60acaaba34b87971a1c211e95836e50158c9493b..32e5f80a9c5c3893f26145eaa1f6098fcc602b1a 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py
@@ -34,11 +34,13 @@ _log = logging.getLogger(__name__)
class NetworkTimeout(Exception):
+
def __str__(self):
return 'NetworkTimeout'
class NetworkTransaction(object):
+
def __init__(self, initial_backoff_seconds=10, grown_factor=1.5, timeout_seconds=(10 * 60), convert_404_to_None=False):
self._initial_backoff_seconds = initial_backoff_seconds
self._grown_factor = grown_factor
@@ -55,7 +57,8 @@ class NetworkTransaction(object):
if self._convert_404_to_None and e.code == 404:
return None
self._check_for_timeout()
- _log.warn("Received HTTP status %s loading \"%s\". Retrying in %s seconds..." % (e.code, e.filename, self._backoff_seconds))
+ _log.warn("Received HTTP status %s loading \"%s\". Retrying in %s seconds..." %
+ (e.code, e.filename, self._backoff_seconds))
self._sleep()
def _check_for_timeout(self):

Powered by Google App Engine
This is Rietveld 408576698