def _scrub_headers(headers):
 headers = dict(headers)
 if ('Authorization' in headers):
  auth = headers['Authorization']
  if auth.startswith('token '):
   headers['Authorization'] = 'token [secret]'
 return headers

def _scrub_headers ( headers ) : headers = dict ( headers ) if ( 'Authorization' in headers ) : auth = headers [ 'Authorization' ] if auth . startswith ( 'token ' ) : headers [ 'Authorization' ] = 'token [secret]' return headers
scrub auth info from headers .