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:
Assaf Muller 2015-03-11 11:45:00 -04:00
parent 6216b000ba
commit c7d8094086
1 changed files with 1 additions and 1 deletions

View File

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