diff --git a/.github/workflows/windows-x86.yml b/.github/workflows/windows-x86.yml index 346a507b..69b5ea23 100644 --- a/.github/workflows/windows-x86.yml +++ b/.github/workflows/windows-x86.yml @@ -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 diff --git a/.github/workflows/ykman-win32-patch.patch b/.github/workflows/ykman-win32-patch.patch new file mode 100644 index 00000000..a4d5c5c2 --- /dev/null +++ b/.github/workflows/ykman-win32-patch.patch @@ -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: \ No newline at end of file