From ec198d632b7e22b4072a5cff9934527675fe63d0 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 20 Dec 2013 14:40:40 +0100 Subject: [PATCH] [RigoDaemon] make sure that the serializer is always released Even in case of exceptions. --- rigo/RigoDaemon/app.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rigo/RigoDaemon/app.py b/rigo/RigoDaemon/app.py index df5ac39ac..3a8619799 100755 --- a/rigo/RigoDaemon/app.py +++ b/rigo/RigoDaemon/app.py @@ -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): """