From ecc400a6d3984c9d728264e26b240ff644999a2b Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Thu, 7 Feb 2019 14:36:01 -0800 Subject: [PATCH] Keep going even if the client rejects a post --- bin/wunderfixer | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/wunderfixer b/bin/wunderfixer index e8a60ea0..b7c3737d 100755 --- a/bin/wunderfixer +++ b/bin/wunderfixer @@ -276,6 +276,11 @@ def main() : print >>sys.stderr, "Aborted." wlog.slog(syslog.LOG_ERR, "%s ...error %s. Aborting." % (timestamp_to_string(record['dateTime']), e)) exit("Failed post") + except weewx.restx.AbortedPost as e: + print >>sys.stderr, " ... not published." + print "Reason: ", e + wlog.slog(syslog.LOG_ERR, "%s ...not published. Reason '%s'" % + (timestamp_to_string(record['dateTime']), e)) except IOError as e: print >>sys.stderr, " ... not published." print "Reason: ", e