mirror of
https://github.com/weewx/weewx.git
synced 2026-05-24 17:55:15 -04:00
deal with libusb/pyusb that fail setConfiguration
This commit is contained in:
@@ -312,7 +312,7 @@ import weewx.drivers
|
||||
import weewx.wxformulas
|
||||
|
||||
DRIVER_NAME = 'AcuRite'
|
||||
DRIVER_VERSION = '0.17'
|
||||
DRIVER_VERSION = '0.18'
|
||||
DEBUG_RAW = 0
|
||||
|
||||
# USB constants for HID
|
||||
@@ -547,7 +547,7 @@ class Station(object):
|
||||
# FIXME: is it necessary to set the configuration?
|
||||
try:
|
||||
self.handle.setConfiguration(dev.configurations[0])
|
||||
except usb.USBError, e:
|
||||
except (AttributeError, usb.USBError), e:
|
||||
loginf("Set configuration failed: %s" % e)
|
||||
|
||||
# attempt to claim the interface
|
||||
@@ -561,7 +561,7 @@ class Station(object):
|
||||
# FIXME: is it necessary to set the alt interface?
|
||||
try:
|
||||
self.handle.setAltInterface(interface)
|
||||
except usb.USBError, e:
|
||||
except (AttributeError, usb.USBError), e:
|
||||
loginf("Set alt interface failed: %s" % e)
|
||||
|
||||
def close(self):
|
||||
|
||||
@@ -783,7 +783,7 @@ Version: 3.1.0
|
||||
<li><a id="rainwise">RainWise Mark III Stations.</a> Tested on the
|
||||
<a href="http://www.rainwise.com/">CC3000 Data Logger</a>.
|
||||
</li>
|
||||
<li><a id="acurite">AcuRite Weather Stations.</a> Test on the
|
||||
<li><a id="acurite">AcuRite Weather Stations.</a> Tested on the
|
||||
<a href="http://www.acurite.com/8-pro-digital-weather-station-with-pc-connect-01036.html">01036RX</a>.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
Reference in New Issue
Block a user