Catches exception weewx.ArchiveError and keeps going.

This commit is contained in:
Tom Keffer
2010-11-19 02:42:55 +00:00
parent 5d92ea9bb4
commit 67f0ddfd47

View File

@@ -370,9 +370,12 @@ class StdArchive(StdService):
def newArchivePacket(self, archivePacket):
"""Add a new archive record to the SQL archive and stats databases."""
# Add the new record to the archive database and stats database:
self.archive.addRecord(archivePacket)
self.statsDb.addArchiveRecord(archivePacket)
try:
# Add the new record to the archive database and stats database:
self.archive.addRecord(archivePacket)
self.statsDb.addArchiveRecord(archivePacket)
except weewx.ArchiveError:
pass
def processArchiveData(self):
"""Retrieves that last timestamp in the database, then posts that time to the engine"""