Fix TypeError for Indicators resource

This change fixes the TypeError that was being thrown because the
`connection` attribute was being accessed before it was set.

Change-Id: Ib14684046f520d907e8197e0abf310226b9d5693
This commit is contained in:
Varsha 2019-08-19 12:11:45 +05:30
parent 857a02cf93
commit 11c75114d1

View File

@ -33,13 +33,14 @@ class StaticDriver(DriverBase):
cls._config = config
cls._indicators = memoize.PersistentDict()
cls._indicators.update(
config.get('SUSHY_EMULATOR_INDICATOR_LEDS', {}))
if hasattr(cls._indicators, 'make_permanent'):
cls._indicators.make_permanent(
config.get('SUSHY_EMULATOR_STATE_DIR'), 'indicators')
cls._indicators.update(
config.get('SUSHY_EMULATOR_INDICATOR_LEDS', {}))
return cls
@property