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

Side by Side Diff: client/utils/net.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « client/utils/lru.py ('k') | client/utils/oauth.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Classes and functions for generic network communication over HTTP.""" 5 """Classes and functions for generic network communication over HTTP."""
6 6
7 import cookielib 7 import cookielib
8 import cStringIO as StringIO 8 import cStringIO as StringIO
9 import datetime 9 import datetime
10 import httplib 10 import httplib
11 import itertools 11 import itertools
12 import json 12 import json
13 import logging 13 import logging
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 attemp_obj = RetryAttempt(attempt, remaining) 860 attemp_obj = RetryAttempt(attempt, remaining)
861 yield attemp_obj 861 yield attemp_obj
862 if attemp_obj.skip_sleep: 862 if attemp_obj.skip_sleep:
863 continue 863 continue
864 # Only sleep if we are going to try again. 864 # Only sleep if we are going to try again.
865 if max_attempts and attempt != max_attempts - 1: 865 if max_attempts and attempt != max_attempts - 1:
866 remaining = (timeout - (current_time() - start)) if timeout else None 866 remaining = (timeout - (current_time() - start)) if timeout else None
867 if remaining is not None and remaining < 0: 867 if remaining is not None and remaining < 0:
868 break 868 break
869 sleep_before_retry(attempt, remaining) 869 sleep_before_retry(attempt, remaining)
OLDNEW
« no previous file with comments | « client/utils/lru.py ('k') | client/utils/oauth.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698