cleaner logging
This commit is contained in:
parent
721c1d0f54
commit
ee23c0fe14
1 changed files with 4 additions and 10 deletions
|
@ -128,18 +128,12 @@ class SnmpScanner(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
if errindication:
|
if errindication:
|
||||||
# Supressing logging-format-interpolation
|
_LOGGER.error("SNMPLIB error: %s", errindication)
|
||||||
# pylint: disable=W1202
|
|
||||||
_LOGGER.error("SNMPLIB error: {}".format(errindication))
|
|
||||||
return
|
return
|
||||||
if errstatus:
|
if errstatus:
|
||||||
err = "SNMP error: {} at {}"
|
_LOGGER.error('SNMP error: %s at %s', errstatus.prettyPrint(),
|
||||||
# Supressing logging-format-interpolation
|
errindex and restable[-1][int(errindex)-1]
|
||||||
# pylint: disable=W1202
|
or '?')
|
||||||
_LOGGER.error(err.format(errstatus.prettyPrint(),
|
|
||||||
errindex and
|
|
||||||
restable[-1][int(errindex)-1]
|
|
||||||
or '?'))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
for resrow in restable:
|
for resrow in restable:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue