Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcpip: ignore network with a netmask set to None #478

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ PyVISA-py Changelog
0.7.3 (unreleased)
------------------

- ignore network interface card with no subnet mask when discovering TCPIP
resources PR #478
- add VICP INSTR to the supported interface for TCPIP keep alive attr PR #477
- add read_stb method for TCPIP HiSLIP client PR #429
- fix usbtmc implementation to respect section 3.3 of the spec PR #449
Read now reads from usb until a "short packet" or if all data (`transfer_size`) PR #465
has been read (see specification), and only expects a header on the first packet received.
- fix usbtmc implementation to properly discard the alignment bytes
ensuring only the actual data (`transfer_size`) is retained in the message PR #465
ensuring only the actual data (`transfer_size`) is retained in the message PR #465
- add support for VI_ATTR_SUPPRESS_END_EN for USB resources PR #449

0.7.2 (07/03/2024)
Expand Down
2 changes: 1 addition & 1 deletion pyvisa_py/tcpip.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def list_resources() -> List[str]:
# Get broadcast address for each interface
for interface, snics in psutil.net_if_addrs().items():
for snic in snics:
if snic.family is socket.AF_INET:
if snic.family is socket.AF_INET and snic.netmask is not None:
addr = snic.address
mask = snic.netmask
network = ipaddress.IPv4Network(addr + "/" + mask, strict=False)
Expand Down
Loading