Narrow scope of various pylint inline disables (#15364)

* Narrow scope of various pylint inline disables

* Whitespace tweaks
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-10-10 12:17:11 +02:00
1 parent 78c38749ab
commit 707b7c202d
30 files changed
+52 -75

No files matched your search

+2 -4
View File
@@ -42,11 +42,10 @@ def setup(hass, config):
device = config[DOMAIN][CONF_DEVICE]
global SCSGATE
# pylint: disable=broad-except
try:
SCSGATE = SCSGate(device=device, logger=_LOGGER)
SCSGATE.start()
except Exception as exception:
except Exception as exception: # pylint: disable=broad-except
_LOGGER.error("Cannot setup SCSGate component: %s", exception)
return False
@@ -101,10 +100,9 @@ class SCSGate:
if new_device_activated:
self._activate_next_device()
# pylint: disable=broad-except
try:
self._devices[message.entity].process_event(message)
except Exception as exception:
except Exception as exception: # pylint: disable=broad-except
msg = "Exception while processing event: {}".format(exception)
self._logger.error(msg)
else: