From 41f42e8650dd22a733d9b8b8bf472d5e196b775b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 8 Jun 2008 19:46:01 +0200 Subject: [PATCH] Add error message on exception in database creation for issue96 --- tryton/gui/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tryton/gui/main.py b/tryton/gui/main.py index d6cf612907..7666fa331e 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -256,9 +256,10 @@ class DBCreate(object): try: users = rpc.db_exec(host, int(port), 'create', passwd, dbname, langreal) - except: + except Exception, exception: common.warning(_('The server crashed during installation.\n' \ - 'We suggest you to drop this database.'), parent, + 'We suggest you to drop this database.\n' \ + 'Error message:\n') + str(exception[0]), parent, _("Error during database creation!")) return False dialog = glade.XML(GLADE, "dia_dbcreate_ok", gettext.textdomain())