Name | Date | Size | |
---|---|---|---|
.. | 23-Aug-2016 | 4 KiB | |
.gitignore | 23-Aug-2016 | 317 | |
CHANGES.txt | 23-Aug-2016 | 913 | |
LICENSE.txt | 23-Aug-2016 | 1 KiB | |
Makefile | 23-Aug-2016 | 240 | |
MANIFEST.in | 23-Aug-2016 | 53 | |
README.rst | 23-Aug-2016 | 466 | |
retry_decorator/ | 23-Aug-2016 | 4 KiB | |
setup.py | 23-Aug-2016 | 589 |
README.rst
1 2Usage 3----- 4 5Retry decorator 6 7:: 8 9 #!/usr/bin/env python 10 11 from __future__ import print_function 12 from retry_decorator import * 13 14 @retry(Exception, tries = 3, timeout_secs = 0.1) 15 def test_retry(): 16 import sys 17 print('hello', file = sys.stderr) 18 raise Exception('Testing retry') 19 20 if __name__ == '__main__': 21 try: 22 test_retry() 23 except Exception as e: 24 print('Received the last exception') 25