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
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.')