From 67f0ddfd47db02e52718ca39b9ccb02560e4237e Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Fri, 19 Nov 2010 02:42:55 +0000 Subject: [PATCH] Catches exception weewx.ArchiveError and keeps going. --- bin/weewx/wxengine.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/weewx/wxengine.py b/bin/weewx/wxengine.py index 4f66b4f1..3176b525 100644 --- a/bin/weewx/wxengine.py +++ b/bin/weewx/wxengine.py @@ -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"""