Skip to content

Commit

Permalink
Fix flake8/pycodestyle E721 do not compare types
Browse files Browse the repository at this point in the history
  • Loading branch information
garethsb committed Aug 1, 2023
1 parent aa58b5e commit 884da90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/dut-data-exporter/dutDataExporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def url_port_number(url):
response = requests.get(url)
mac_addresses = response.json()["interfaces"]
for address in mac_addresses:
if type(address["port_id"]) == str:
if isinstance(address["port_id"], str):
address["port_id"] = address["port_id"].replace("-", ":")
if type(address["chassis_id"]) == str:
if isinstance(address["chassis_id"], str):
address["chassis_id"] = address["chassis_id"].replace("-", ":")
node_id = response.json()["id"]
print("Host: {}".format(response.json()["description"]))
Expand Down

0 comments on commit 884da90

Please sign in to comment.