def is_whitelisted_host(host):
 whitelist = config.get('content', 'host-blocking-whitelist')
 if (whitelist is None):
  return False
 for pattern in whitelist:
  if fnmatch.fnmatch(host, pattern.lower()):
   return True
 return False

def is_whitelisted_host ( host ) : whitelist = config . get ( 'content' , 'host-blocking-whitelist' ) if ( whitelist is None ) : return False for pattern in whitelist : if fnmatch . fnmatch ( host , pattern . lower ( ) ) : return True return False
check if the given host is on the adblock whitelist .