def _fail_silently(method):

    @functools.wraps(method)
    def wrapped(self, quota_name, *args, **kwargs):
        try:
            return method(self, quota_name, *args, **kwargs)
        except Quota.DoesNotExist:
            if not kwargs.get('fail_silently', False):
                raise Quota.DoesNotExist('Object %s does not have quota with name %s' % (self, quota_name))

    return wrapped
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/quotas/models.py/_fail_silently/original