Add test for db exist before creating it.

This commit is contained in:
Cédric Krier committed 2008-06-18 16:17:54 +02:00
1 parent 2c2c7ea745
commit dca179f345
1 file changed
+4
+4
View File
@@ -267,6 +267,10 @@ class DBCreate(object):
if res == gtk.RESPONSE_OK:
try:
if rpc.db_exec(host, int(port), 'db_exist', dbname):
common.warning(_('Try with an other name.'), parent,
_('The Database already exists!'))
return False
users = rpc.db_exec(host, int(port), 'create', passwd, dbname,
langreal)
Main.get_main().refresh_ssl()