Fixes bug claiming interface

Currently the script tries to detach the kernel driver even if it is not active; this causes the script to crash.
This fixes it to only try to detach the kernel driver if it is actually active.
Tested on a real Razer Blackwidow 2014.
This commit is contained in:
pjetherton 2020-03-28 16:18:15 +00:00 committed by GitHub
parent 739ab2523c
commit 0a76d3eec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -51,7 +51,6 @@ class BlackWidow(object):
try:
if self.device.is_kernel_driver_active(USB_INTERFACE):
LOG("Kernel driver active; detaching it\n")
self.device.detach_kernel_driver(USB_INTERFACE)
self.kernel_driver_detached = True