From: gatici Date: Mon, 31 Jul 2023 11:37:32 +0000 (+0300) Subject: Fix flake8 error caused by using type instead of isinstance X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fv10.0;p=osm%2FNBI.git Fix flake8 error caused by using type instead of isinstance Change-Id: Iccbf5a3a61e7b1c76c8e4e062fd8c24a09a39314 Signed-off-by: gatici (cherry picked from commit d7debb9afcbfe0fb1c112ea0834458753ffe34b1) --- diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index 1930254..a2c17ee 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -557,7 +557,7 @@ class DescriptorTopic(BaseTopic): # to preserve current expected behaviour if "userDefinedData" in indata: data = indata.pop("userDefinedData") - if type(data) == dict: + if isinstance(data, dict): indata["_admin"]["userDefinedData"] = data else: raise EngineException( @@ -1182,7 +1182,7 @@ class NsdTopic(DescriptorTopic): # to preserve current expected behaviour if "userDefinedData" in indata: data = indata.pop("userDefinedData") - if type(data) == dict: + if isinstance(data, dict): indata["_admin"]["userDefinedData"] = data else: raise EngineException(