Fix flake8 error caused by using type instead of isinstance 92/13792/1 paas
authorgatici <gulsum.atici@canonical.com>
Mon, 31 Jul 2023 11:37:32 +0000 (14:37 +0300)
committeraticig <gulsum.atici@canonical.com>
Mon, 31 Jul 2023 11:42:31 +0000 (13:42 +0200)
Change-Id: Iccbf5a3a61e7b1c76c8e4e062fd8c24a09a39314
Signed-off-by: gatici <gulsum.atici@canonical.com>
osm_nbi/descriptor_topics.py

index ca10c42..7808597 100644 (file)
@@ -676,7 +676,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(
@@ -1505,7 +1505,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(