From 0a21a72801353fdf2bdf217f90358bcdbb78e87f Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Fri, 22 Feb 2019 06:30:26 -0800 Subject: [PATCH] Fixed problem with handling CWOP connection errors. --- bin/weewx/restx.py | 3 +-- docs/changes.txt | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/weewx/restx.py b/bin/weewx/restx.py index aeb0d48c..6a3336bc 100644 --- a/bin/weewx/restx.py +++ b/bin/weewx/restx.py @@ -1281,8 +1281,7 @@ class CWOPThread(RESTThread): # Unsuccessful. Close it in case it was open: try: _sock.close() - except AttributeError as xxx_todo_changeme: - socket.error = xxx_todo_changeme + except (AttributeError, socket.error): pass raise ConnectError(e) diff --git a/docs/changes.txt b/docs/changes.txt index c2f156dd..65c12957 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -16,6 +16,8 @@ record interval is zero. Fixes issue #375. Posts to the Weather Underground now use https, instead of http. Thanks to user mljenkins! PR #378. +Fixed problem with handling CWOP connection errors. + 3.9.1 02/06/2019