# HG changeset patch # User Paul Boddie # Date 1465053396 -7200 # Node ID 2102cbcbadd01dd1bb9a3e032c8d5777a7a182fb # Parent a91c990d9a3ed9f126111a2385535e901928465b Moved the schedule call inside the try...finally statement to ensure that failure causes locks to be released, since the start_scheduling call which acquires locks occurs inside apply_scheduling_functions (which is called by the schedule method). diff -r a91c990d9a3e -r 2102cbcbadd0 imiptools/handlers/resource.py --- a/imiptools/handlers/resource.py Sat Jun 04 13:52:46 2016 +0200 +++ b/imiptools/handlers/resource.py Sat Jun 04 17:16:36 2016 +0200 @@ -94,9 +94,9 @@ # Attempt to schedule the event. - scheduled, description = self.schedule() + try: + scheduled, description = self.schedule() - try: # Update the participation of the resource in the object. # Update free/busy information.