From 11e6cd2d3e5546b3cb1406febcbeda5302da797a Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Wed, 24 Jun 2015 09:05:40 -0400 Subject: [PATCH] deal with libusb/pyusb that fail setConfiguration --- bin/weewx/drivers/acurite.py | 6 +++--- docs/usersguide.htm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/weewx/drivers/acurite.py b/bin/weewx/drivers/acurite.py index 80b0ffd4..865de600 100644 --- a/bin/weewx/drivers/acurite.py +++ b/bin/weewx/drivers/acurite.py @@ -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): diff --git a/docs/usersguide.htm b/docs/usersguide.htm index 4bc17bc2..f54989fb 100644 --- a/docs/usersguide.htm +++ b/docs/usersguide.htm @@ -783,7 +783,7 @@ Version: 3.1.0
  • RainWise Mark III Stations. Tested on the CC3000 Data Logger.
  • -
  • AcuRite Weather Stations. Test on the +
  • AcuRite Weather Stations. Tested on the 01036RX.