How to use the createsend.ClientError function in createsend

To help you get started, we’ve selected a few createsend 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 campaignmonitor / createsend-python / lib / createsend / utils.py View on Github external
def validate_consent_to_track(user_input):
    from createsend import ClientError
    if hasattr(user_input, 'lower'):
        user_input = user_input.lower()
    if user_input in VALID_CONSENT_TO_TRACK_VALUES:
        return
    raise ClientError("Consent to track value must be one of %s" % (VALID_CONSENT_TO_TRACK_VALUES,))