From 6d98ecc7826e9d9ab606be0c3ea0ea9579c010a8 Mon Sep 17 00:00:00 2001 From: Michael James Date: Thu, 11 Oct 2018 20:33:53 -0600 Subject: [PATCH] use isinstance() instead of type() --- .../com/raytheon/uf/common/dataplugin/level/Level.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/level/Level.py b/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/level/Level.py index 47be90c..a1f413c 100644 --- a/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/level/Level.py +++ b/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/level/Level.py @@ -93,7 +93,7 @@ class Level(object): return False def __le__(self, other): - if type(self) != type(other): + if not isinstance(self, other): return NotImplemented elif self.masterLevel.getName() != other.masterLevel.getName(): return NotImplemented @@ -101,7 +101,7 @@ class Level(object): return self.__lt__(other) or self.__eq__(other) def __gt__(self, other): - if type(self) != type(other): + if not isinstance(self, other): return NotImplemented elif self.masterLevel.getName() != other.masterLevel.getName(): return NotImplemented @@ -133,7 +133,7 @@ class Level(object): return False def __ge__(self, other): - if type(self) != type(other): + if not isinstance(self, other): return NotImplemented elif self.masterLevel.getName() != other.masterLevel.getName(): return NotImplemented