Commit 69328181251 by Julien Salort

Use one isinstance with tuple

parent e362f623a58
......@@ -74,9 +74,7 @@ def interface_from_string(name, defaultPhysicalInterface=None, **kwargs):
elif "ASRL" in name:
physicalInterface = PhysicalInterfaceType.Serial
classname = "VISAInterface"
elif isinstance(name, ipaddress.IPv4Address) or isinstance(
name, ipaddress.IPv6Address
elif isinstance(name, (ipaddress.IPv4Address, ipaddress.IPv6Address)):
name = str(name)
physicalInterface = PhysicalInterfaceType.Ethernet
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment