• Home
  • History
  • Annotate
  • only in /external/chromium-trace/catapult/third_party/gsutil/third_party/retry-decorator/
NameDateSize

..23-Aug-20164 KiB

.gitignore23-Aug-2016317

CHANGES.txt23-Aug-2016913

LICENSE.txt23-Aug-20161 KiB

Makefile23-Aug-2016240

MANIFEST.in23-Aug-201653

README.rst23-Aug-2016466

retry_decorator/23-Aug-20164 KiB

setup.py23-Aug-2016589

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