hooks/__init__.py
changeset 6988 2f4a7d1e15b3
parent 6957 ffda12be2e9f
child 7398 26695dd703d8
--- a/hooks/__init__.py	Fri Feb 11 16:45:43 2011 +0100
+++ b/hooks/__init__.py	Mon Feb 14 09:38:03 2011 +0100
@@ -59,9 +59,9 @@
                         continue
                     try:
                         stats = source.pull_data(session)
-                        if stats['created']:
+                        if stats.get('created'):
                             source.info('added %s entities', len(stats['created']))
-                        if stats['updated']:
+                        if stats.get('updated'):
                             source.info('updated %s entities', len(stats['updated']))
                         session.commit()
                     except Exception, exc: