def get_zendesk():
 zendesk_url = settings.ZENDESK_URL
 zendesk_email = settings.ZENDESK_USER_EMAIL
 zendesk_password = settings.ZENDESK_USER_PASSWORD
 if ((not zendesk_url) or (not zendesk_email) or (not zendesk_password)):
  log.error('Zendesk settings error: please set ZENDESK_URL, ZENDESK_USER_EMAIL and ZENDESK_USER_PASSWORD.')
  statsd.incr('questions.zendesk.settingserror')
  raise ZendeskSettingsError('Missing Zendesk settings.')
 return Zendesk(zendesk_url, zendesk_email, zendesk_password, api_version=2)

def get_zendesk ( ) : zendesk_url = settings . ZENDESK_URL zendesk_email = settings . ZENDESK_USER_EMAIL zendesk_password = settings . ZENDESK_USER_PASSWORD if ( ( not zendesk_url ) or ( not zendesk_email ) or ( not zendesk_password ) ) : log . error ( 'Zendesk settings error: please set ZENDESK_URL, ZENDESK_USER_EMAIL and ZENDESK_USER_PASSWORD.' ) statsd . incr ( 'questions.zendesk.settingserror' ) raise ZendeskSettingsError ( 'Missing Zendesk settings.' ) return Zendesk ( zendesk_url , zendesk_email , zendesk_password , api_version = 2 )
instantiate and return a zendesk client .