Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,))