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