1.1 --- a/imiptools/handlers/scheduling/__init__.py Wed May 11 15:59:28 2016 +0200
1.2 +++ b/imiptools/handlers/scheduling/__init__.py Thu May 12 16:09:54 2016 +0200
1.3 @@ -102,15 +102,17 @@
1.4 # First, lock the resources to be used.
1.5
1.6 start_scheduling(handler)
1.7 -
1.8 - # Obtain the actual retraction functions with arguments.
1.9 + try:
1.10
1.11 - functions = get_function_calls(handler.get_scheduling_functions(), retraction_functions)
1.12 - apply_functions(functions, handler)
1.13 + # Obtain the actual retraction functions with arguments.
1.14 +
1.15 + functions = get_function_calls(handler.get_scheduling_functions(), retraction_functions)
1.16 + apply_functions(functions, handler)
1.17
1.18 # Finally, unlock the resources.
1.19
1.20 - finish_scheduling(handler)
1.21 + finally:
1.22 + finish_scheduling(handler)
1.23
1.24 def start_scheduling(handler):
1.25