From 1bbd169909d08d22e4d0de5ebf8821ea8176af0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 5 Dec 2013 15:57:52 +0100 Subject: [PATCH] Backed out changeset 22ff9f4b16ff --- trytond/protocols/dispatcher.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py index 4ef488e607..b8982f965e 100644 --- a/trytond/protocols/dispatcher.py +++ b/trytond/protocols/dispatcher.py @@ -84,12 +84,15 @@ def dispatch(host, port, protocol, database_name, user, session, object_type, if CONFIG['prevent_dblist']: raise Exception('AccessDenied') database = Database().connect() - with Transaction().start(None, 0) as transaction: - cursor = transaction.cursor + try: + cursor = database.cursor() try: - return database.list(cursor) + res = database.list(cursor) finally: cursor.close(close=True) + except Exception: + res = [] + return res elif method == 'create': return create(*args, **kwargs) elif method == 'restore':