From 2eab229697a0d28ee2f97c2b48157e2d3842e0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 17 Apr 2008 17:16:21 +0200 Subject: [PATCH] Fix dead lock when exception occurs in load_modules_graph --- trytond/module.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trytond/module.py b/trytond/module.py index e981a02132..2e1803b773 100644 --- a/trytond/module.py +++ b/trytond/module.py @@ -307,7 +307,11 @@ def load_modules(database, update_module=False, lang=None): module_list.append(module) graph = create_graph(module_list, force)[0] - load_module_graph(cursor, graph, lang) + try: + load_module_graph(cursor, graph, lang) + except: + cursor.close() + raise for kind in ('init', 'update'):