From fd3d19393b42669269e372be1701a8ae00ef2c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 3 Feb 2011 00:58:49 +0100 Subject: [PATCH] Catch exception on db_exist call for issue1843 --- tryton/gui/window/dbcreate.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/dbcreate.py b/tryton/gui/window/dbcreate.py index 82b7968d47..5bc3f9a0e3 100644 --- a/tryton/gui/window/dbcreate.py +++ b/tryton/gui/window/dbcreate.py @@ -357,8 +357,13 @@ class DBCreate(object): and langreal \ and passwd \ and admin_passwd.get_text(): - if rpc.db_exec(url_m.group(1), int(url_m.group(2)), - 'db_exist', dbname): + try: + exist = rpc.db_exec(url_m.group(1), + int(url_m.group(2)), 'db_exist', dbname) + except Exception, exception: + common.process_exception(exception, self.dialog) + continue + if exist: common.warning(_("A database with the same name " \ "already exists.\n" \ "Try another database name."), self.dialog,