handle better devices which do not support feature calls
This commit is contained in:
parent
8db1ce97a8
commit
b2db0706c6
|
@ -37,7 +37,7 @@ class _FeaturesArray(object):
|
||||||
except _api._FeatureNotSupported:
|
except _api._FeatureNotSupported:
|
||||||
self.supported = False
|
self.supported = False
|
||||||
else:
|
else:
|
||||||
count = _base.request(handle, self.device.number, _pack('!BB', index, 0x00))
|
count = None if index is None else _base.request(handle, self.device.number, _pack('!BB', index, 0x00))
|
||||||
if count is None:
|
if count is None:
|
||||||
self.supported = False
|
self.supported = False
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue