Skip to content

Commit

Permalink
Patch for ykman win32
Browse files Browse the repository at this point in the history
  • Loading branch information
fdennis committed Mar 12, 2021
1 parent 71f9777 commit 655dff5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/windows-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
$version = $matches['content']
patch .\ykman-gui\pymodules\ykman\device.py .github/workflows/ykman-patch.patch
patch .\ykman-gui\pymodules\ykman\hid\windows.py .github/workflows/ykman-win32-patch.patch
Copy-Item .\ykman-gui\pymodules .\ykman-gui\release -recurse
Get-ChildItem -File -Include *.pyc -Recurse | Remove-Item -Force
Get-ChildItem -Include __pycache__ -Recurse | Remove-Item -Force
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ykman-win32-patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/ykman/hid/windows.py b/ykman/hid/windows.py
index 2eb4070..8712fd3 100644
--- a/ykman/hid/windows.py
+++ b/ykman/hid/windows.py
@@ -319,7 +319,8 @@ def list_devices():
path, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, None, OPEN_EXISTING, 0, None,
)
if device == INVALID_HANDLE_VALUE:
- raise ctypes.WinError()
+ logger.debug("Failed reading HID descriptor: INVALID_HANDLE")
+ continue
try:
usage = get_usage(device)
if usage == USAGE_OTP:

0 comments on commit 655dff5

Please sign in to comment.