Author: tmckay
Date: 2010-12-17 16:39:40 +0000 (Fri, 17 Dec 2010)
New Revision: 4439
Modified:
trunk/mint/python/mint/update.py
Log:
Add a test for None value in check for forced write. Scale testing revealed errors
generated when objects arrive with save_time or update_time equal to None.
Modified: trunk/mint/python/mint/update.py
===================================================================
--- trunk/mint/python/mint/update.py 2010-12-17 16:01:37 UTC (rev 4438)
+++ trunk/mint/python/mint/update.py 2010-12-17 16:39:40 UTC (rev 4439)
@@ -380,7 +380,9 @@
# force a write if it's been too long, even if the values match
if object_columns \
- or obj._save_time < obj._qmf_update_time - timedelta(hours=1):
+ or (obj._save_time != None and \
+ obj._qmf_update_time != None and \
+ obj._save_time < obj._qmf_update_time - timedelta(hours=1)):
object_columns.append(cls.sql_table._qmf_update_time)
sql = cls.sql_update_object.emit(object_columns)
Show replies by date