def get_linkstate_filter(self): from nav.ipdevpoll.config import ipdevpoll_conf as conf default = 'topology' link_filter = (conf.get('linkstate', 'filter') if conf.has_option( 'linkstate', 'filter') else default) if link_filter not in ('any', 'topology'): self._logger.warning( "configured linkstate filter is invalid: %r" " (using %r as default)", link_filter, default) return default else: return link_filter
def get_linkstate_filter(self): from nav.ipdevpoll.config import ipdevpoll_conf as conf default = 'topology' link_filter = (conf.get('linkstate', 'filter') if conf.has_option('linkstate', 'filter') else default) if link_filter not in ('any', 'topology'): self._logger.warning("configured linkstate filter is invalid: %r" " (using %r as default)", link_filter, default) return default else: return link_filter