Socket
Socket
Sign inDemoInstall

retry-decorator

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    retry-decorator

Retry Decorator


Maintainers
1

Readme

.. image:: https://badge.fury.io/py/retry_decorator.svg :target: https://badge.fury.io/py/retry_decorator

.. image:: https://travis-ci.org/pnpnpn/retry-decorator.svg?branch=master :target: https://travis-ci.org/pnpnpn/retry-decorator

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')

Contribute

I would love for you to fork and send me pull request for this project. Please contribute.

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc