Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed: make sure there is a valid handle before do a reset.

If reset method is called without a valid device handle, we will
probably have a crash. So, call managed_open before calling reset.
  • Loading branch information...
commit 163c93aaad39a4c0c9c9f21a652557f9fd71f6c9 1 parent e535b29
@walac authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  usb/core.py
View
1  usb/core.py
@@ -590,6 +590,7 @@ def set_interface_altsetting(self, interface = None, alternate_setting = None):
def reset(self):
r"""Reset the device."""
+ self._ctx.managed_open()
self._ctx.dispose(self, False)
self._ctx.backend.reset_device(self._ctx.handle)
self._ctx.dispose(self, True)
Please sign in to comment.
Something went wrong with that request. Please try again.