I am trying to create a custom force feedback device.
Something isn't working right, and so input tries to throw an error with this line:
|
raise UInputError('Failed to begin uinput erase: ' + os.strerror()) |
Except that line seems to have a bug. Instead of throwing UInputError it throws:
TypeError: strerror() takes exactly one argument (0 given)
It looks like the return code from line 245 needs to be stored. So instead of:
if self.dll._uinput_begin_upload(self.fd, ctypes.byref(upload)):
raise UInputError('Failed to begin uinput upload: ' + os.strerror())
You might want:
ret = self.dll._uinput_begin_upload(self.fd, ctypes.byref(upload))
if ret:
raise UInputError('Failed to begin uinput upload: ' + os.strerror(ret))
Or am I missing something? If it is an error and I can help with a pull request please let me know!
I am trying to create a custom force feedback device.
Something isn't working right, and so input tries to throw an error with this line:
python-evdev/evdev/uinput.py
Line 246 in 862c411
Except that line seems to have a bug. Instead of throwing UInputError it throws:
TypeError: strerror() takes exactly one argument (0 given)It looks like the return code from line 245 needs to be stored. So instead of:
You might want:
Or am I missing something? If it is an error and I can help with a pull request please let me know!