| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import time | 5 import time |
| 6 import urllib | 6 import urllib |
| 7 | 7 |
| 8 | 8 |
| 9 _NO_RETRY_CODE = [200, 302, 401, 403, 404, 501] | 9 _NO_RETRY_CODE = [200, 302, 401, 403, 404, 501] |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 returning http status code is not in 200, 302, 401, 403, 404, or 501. | 143 returning http status code is not in 200, 302, 401, 403, 404, or 501. |
| 144 retry_backoff (float): The base backoff in seconds for retry. | 144 retry_backoff (float): The base backoff in seconds for retry. |
| 145 | 145 |
| 146 Returns: | 146 Returns: |
| 147 (status_code, content) | 147 (status_code, content) |
| 148 """ | 148 """ |
| 149 return self._Retry( | 149 return self._Retry( |
| 150 url, method='PUT', data=data, params=None, | 150 url, method='PUT', data=data, params=None, |
| 151 timeout_seconds=timeout_seconds, max_retries=max_retries, | 151 timeout_seconds=timeout_seconds, max_retries=max_retries, |
| 152 retry_backoff=retry_backoff, headers=headers) | 152 retry_backoff=retry_backoff, headers=headers) |
| OLD | NEW |