Catch exception on db_exist call for issue1843
This commit is contained in:
1 parent
307c478be1
commit
fd3d19393b
1 file changed
+7
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user