From 3e9bd12d2febd4a2e7e8844c071e5bd918f4e653 Mon Sep 17 00:00:00 2001 From: gatici Date: Mon, 31 Jul 2023 14:37:32 +0300 Subject: [PATCH] Fix flake8 error caused by using type instead of isinstance Change-Id: Iccbf5a3a61e7b1c76c8e4e062fd8c24a09a39314 Signed-off-by: gatici (cherry picked from commit d7debb9afcbfe0fb1c112ea0834458753ffe34b1) --- osm_nbi/descriptor_topics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index ddf8ffc..8f3529c 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -670,7 +670,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( @@ -1490,7 +1490,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( -- 2.25.1