How to use the dcicutils.beanstalk_utils.beanstalk_info function in dcicutils

To help you get started, we’ve selected a few dcicutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 4dn-dcic / foursight / chalicelib / checks / deployment_checks.py View on Github external
def try_to_describe_indexer_env(env):
    """ Small helper that wraps beanstalk_info so we can recover from exceptions
        XXX: Fix beanstalk_info so it will not throw IndexError if you give it bad env
    """
    try:
        return beanstalk_info(env)
    except IndexError:
        return None  # env does not exist
    except Exception:
        raise  # something else happened we should (probably) raise