Skip to content

Commit

Permalink
Ewb/usberr (#370)
Browse files Browse the repository at this point in the history
* usb: handle USBError in USBRaw get serial number

Fixes #363

Signed-off-by: Eliot Blennerhassett <[email protected]>

* Note for issue #363

---------

Signed-off-by: Eliot Blennerhassett <[email protected]>
  • Loading branch information
eliotb authored Apr 27, 2023
1 parent e953e90 commit 19c133e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PyVISA-py Changelog
- drop support for Python 3.7 PR #362
- fix listing of available resources PR #362
- fix hislip support for custom sub_addresses PR #359
- fix bad USBRaw resource preventing enumeration of other resources

0.6.3 (17-02-2023)
------------------
Expand Down
2 changes: 1 addition & 1 deletion pyvisa_py/usb.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def list_resources() -> List[str]:

try:
serial = dev.serial_number
except (NotImplementedError, ValueError):
except (NotImplementedError, ValueError, usb.USBError):
msg = (
"Found a device whose serial number cannot be read."
" The partial VISA resource name is: " + fmt
Expand Down

0 comments on commit 19c133e

Please sign in to comment.