# HG changeset patch # User nico # Date 1297672683 -3600 # Node ID 2f4a7d1e15b33dabc4607ba7671263013c9318e8 # Parent 528e44ef570caba61ce952ef4d15dbeb50d89f4b [hooks] do not break if no entity created or updated during feed update diff -r 528e44ef570c -r 2f4a7d1e15b3 hooks/__init__.py --- 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: