Fix pylint issue with type VS isinstance in event_observers
New version of pylint started complaining about the unpythonic usage of type. This patch fixes the issue. Another patch will propose to pin the version of pylint. Change-Id: I5377cf152e62a74f6bf0c4ccc8ce3a563066adab
This commit is contained in:
parent
6216b000ba
commit
c7d8094086
@ -24,7 +24,7 @@ class L3EventObservers(object):
|
||||
def add(self, new_observer):
|
||||
"""Add a listener for L3 agent notifications."""
|
||||
for observer in self.observers:
|
||||
if type(observer) == type(new_observer):
|
||||
if isinstance(new_observer, type(observer)):
|
||||
raise ValueError('Only a single instance of AdvancedService '
|
||||
'may be registered, per type of service.')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user