Keep going even if the client rejects a post

This commit is contained in:
Tom Keffer
2019-02-07 14:36:01 -08:00
parent 0b380dcc59
commit ecc400a6d3

View File

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