Revision 40bc67e1 lib/utils.py
b/lib/utils.py | ||
---|---|---|
2498 | 2498 |
class RetryTimeout(Exception): |
2499 | 2499 |
"""Retry loop timed out. |
2500 | 2500 |
|
2501 |
Any arguments which was passed by the retried function to RetryAgain will be |
|
2502 |
preserved in RetryTimeout, if it is raised. If such argument was an exception |
|
2503 |
the RaiseInner helper method will reraise it. |
|
2504 |
|
|
2501 | 2505 |
""" |
2502 | 2506 |
def RaiseInner(self): |
2503 | 2507 |
if self.args and isinstance(self.args[0], Exception): |
... | ... | |
2509 | 2513 |
class RetryAgain(Exception): |
2510 | 2514 |
"""Retry again. |
2511 | 2515 |
|
2516 |
Any arguments passed to RetryAgain will be preserved, if a timeout occurs, as |
|
2517 |
arguments to RetryTimeout. If an exception is passed, the RaiseInner() method |
|
2518 |
of the RetryTimeout() method can be used to reraise it. |
|
2519 |
|
|
2512 | 2520 |
""" |
2513 | 2521 |
|
2514 | 2522 |
|
Also available in: Unified diff