projects
/
osm
/
RO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pin black, flake and pylint versions in tox.ini
[osm/RO.git]
/
RO-SDN-floodlight_openflow
/
osm_rosdn_floodlightof
/
floodlight_of.py
diff --git
a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
index
c5fec1a
..
43b3a30
100644
(file)
--- a/
RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
+++ b/
RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
@@
-241,7
+241,7
@@
class OfConnFloodLight(OpenflowConn):
self.logger.debug("get_of_rules " + error_text)
info = of_response.json()
self.logger.debug("get_of_rules " + error_text)
info = of_response.json()
- if
type(info) != dict
:
+ if
not info.isinstance(dict)
:
self.logger.error(
"get_of_rules. Unexpected response not a dict %s", str(type(info))
)
self.logger.error(
"get_of_rules. Unexpected response not a dict %s", str(type(info))
)
@@
-445,7
+445,7
@@
class OfConnFloodLight(OpenflowConn):
self.logger.debug("obtain_port_correspondence " + error_text)
info = of_response.json()
self.logger.debug("obtain_port_correspondence " + error_text)
info = of_response.json()
- if
type(info) != dict
:
+ if
not info.isinstance(dict)
:
raise OpenflowConnUnexpectedResponse(
"unexpected openflow port-desc response, "
"not a dict. Wrong version?"
raise OpenflowConnUnexpectedResponse(
"unexpected openflow port-desc response, "
"not a dict. Wrong version?"
@@
-457,10
+457,9
@@
class OfConnFloodLight(OpenflowConn):
"'portDesc' not found. Wrong version?"
)
"'portDesc' not found. Wrong version?"
)
- if (
- type(info["portDesc"]) != list
- and type(info["portDesc"]) != tuple
- ):
+ if not info["portDesc"].isinstance(list) and not info[
+ "portDesc"
+ ].isinstance(tuple):
raise OpenflowConnUnexpectedResponse(
"unexpected openflow port-desc response at "
"'portDesc', not a list. Wrong version?"
raise OpenflowConnUnexpectedResponse(
"unexpected openflow port-desc response at "
"'portDesc', not a list. Wrong version?"