projects
/
osm
/
NBI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix flake8 error caused by using type instead of isinstance
[osm/NBI.git]
/
osm_nbi
/
descriptor_topics.py
diff --git
a/osm_nbi/descriptor_topics.py
b/osm_nbi/descriptor_topics.py
index
f28fcbf
..
8f3529c
100644
(file)
--- a/
osm_nbi/descriptor_topics.py
+++ b/
osm_nbi/descriptor_topics.py
@@
-568,7
+568,7
@@
class DescriptorTopic(BaseTopic):
)
storage = content["_admin"]["storage"]
if path is not None and path != "$DESCRIPTOR": # artifacts
)
storage = content["_admin"]["storage"]
if path is not None and path != "$DESCRIPTOR": # artifacts
- if not storage.get("pkg-dir"):
+ if not storage.get("pkg-dir")
and not storage.get("folder")
:
raise EngineException(
"Packages does not contains artifacts",
http_code=HTTPStatus.BAD_REQUEST,
raise EngineException(
"Packages does not contains artifacts",
http_code=HTTPStatus.BAD_REQUEST,
@@
-670,7
+670,7
@@
class DescriptorTopic(BaseTopic):
# to preserve current expected behaviour
if "userDefinedData" in indata:
data = indata.pop("userDefinedData")
# 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(
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")
# 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(
indata["_admin"]["userDefinedData"] = data
else:
raise EngineException(