From bc96c3856dfd6ffbd27e0f59acacfef2b71e4edd Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Thu, 10 Sep 2020 02:28:38 +0300 Subject: Replace assert with proper checks Signed-off-by: Ivan Kanakarakis --- src/saml2/mdstore.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/saml2/mdstore.py') diff --git a/src/saml2/mdstore.py b/src/saml2/mdstore.py index 32778af9..24fccb4d 100644 --- a/src/saml2/mdstore.py +++ b/src/saml2/mdstore.py @@ -405,9 +405,7 @@ class MetaData(object): return res def __eq__(self, other): - try: - assert isinstance(other, MetaData) - except AssertionError: + if not isinstance(other, MetaData): return False if len(self.entity) != len(other.entity): @@ -417,9 +415,7 @@ class MetaData(object): return False for key, item in self.entity.items(): - try: - assert item == other[key] - except AssertionError: + if item != other[key]: return False return True -- cgit v1.2.1