diff -r 3c2dda44e2f6 -r e5d300d75519 server/sources/native.py --- a/server/sources/native.py Thu Apr 01 08:24:11 2010 +0200 +++ b/server/sources/native.py Thu Apr 01 08:24:53 2010 +0200 @@ -482,10 +482,12 @@ except AttributeError: assert event == 'deleted' getattr(storage, 'entity_deleted')(entity, attr) - yield # 2/ execute the source's instructions - # 3/ restore original values - for attr, value in orig_values.items(): - entity[attr] = value + try: + yield # 2/ execute the source's instructions + finally: + # 3/ restore original values + for attr, value in orig_values.items(): + entity[attr] = value def add_entity(self, session, entity): """add a new entity to the source"""