Fix false log message on CAPsMAN only devices (#18687)

* Fix false log message on CAPsMAN only devices 

False debug log message appeared on CAPsMAN only devices without physichal wireless interfaces. This fix eliminates them.

* Fixed indentation to pass flake8 test
This commit is contained in:
Soós Péter 2018-11-25 12:21:26 +01:00 committed by Fabian Affolter
parent 5a5cbe4e72
commit cd773455f0

View File

@ -128,7 +128,8 @@ class MikrotikScanner(DeviceScanner):
librouteros.exceptions.ConnectionError): librouteros.exceptions.ConnectionError):
self.wireless_exist = False self.wireless_exist = False
if not self.wireless_exist or self.method == 'ip': if not self.wireless_exist and not self.capsman_exist \
or self.method == 'ip':
_LOGGER.info( _LOGGER.info(
"Mikrotik %s: Wireless adapters not found. Try to " "Mikrotik %s: Wireless adapters not found. Try to "
"use DHCP lease table as presence tracker source. " "use DHCP lease table as presence tracker source. "