#NEWLINE# def get_scanner( hass , config ) : #NEWLINE# #INDENT# 'Validate the configuration and return an snmp scanner.' #NEWLINE# if ( not validate_config ( scanner , { #NEWLINE# #INDENT# DOMAIN : [ CONF_HOST , CONF_COMMUNITY , CONF_BASEOID ] , #NEWLINE# #UNINDENT# } , _LOGGER ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# scanner = SnmpScanner ( config [ DOMAIN ] ) #NEWLINE# return ( scanner if scanner . success_init else None )