[RigoDaemon] make sure that the serializer is always released

Even in case of exceptions.
This commit is contained in:
Fabio Erculiani
2013-12-20 14:40:40 +01:00
parent bccbce4a34
commit ec198d632b
+9 -9
View File
@@ -1235,9 +1235,9 @@ class RigoDaemonService(dbus.service.Object):
notification_lock = UpdatesNotificationResourceLock(
output=self._entropy)
with notification_lock.exclusive():
try:
with notification_lock.exclusive():
try:
with self._activity_mutex:
self._acquire_shared()
@@ -1250,13 +1250,13 @@ class RigoDaemonService(dbus.service.Object):
finally:
self._release_shared()
finally:
write_output("_installed_repository_updated: "
"releasing serializer (baton)",
debug=True)
# release the serializer object that our parent gave
# us.
serializer.release()
finally:
write_output("_installed_repository_updated: "
"releasing serializer (baton)",
debug=True)
# release the serializer object that our parent gave
# us.
serializer.release()
def _installed_repository_updated_unlocked(self):
"""