deal with libusb/pyusb that fail setConfiguration

This commit is contained in:
Matthew Wall
2015-06-24 09:05:40 -04:00
parent 100f2a9c1d
commit 11e6cd2d3e
2 changed files with 4 additions and 4 deletions

View File

@@ -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):

View File

@@ -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>