Index: third_party/gsutil/third_party/retry-decorator/README.rst |
diff --git a/third_party/gsutil/third_party/retry-decorator/README.rst b/third_party/gsutil/third_party/retry-decorator/README.rst |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4f8b9beb75003f9e411f8f4581be9fcd2e47700f |
--- /dev/null |
+++ b/third_party/gsutil/third_party/retry-decorator/README.rst |
@@ -0,0 +1,24 @@ |
+ |
+Usage |
+----- |
+ |
+Retry decorator |
+ |
+:: |
+ |
+ #!/usr/bin/env python |
+ |
+ from __future__ import print_function |
+ from retry_decorator import * |
+ |
+ @retry(Exception, tries = 3, timeout_secs = 0.1) |
+ def test_retry(): |
+ import sys |
+ print('hello', file = sys.stderr) |
+ raise Exception('Testing retry') |
+ |
+ if __name__ == '__main__': |
+ try: |
+ test_retry() |
+ except Exception as e: |
+ print('Received the last exception') |