Add exception for not being able to connect to MySQL, make use of it to pop up an error box
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ class fpdb_db:
|
||||
try:
|
||||
self.db = MySQLdb.connect(host = host, user = user, passwd = password, db = database, use_unicode=True)
|
||||
except:
|
||||
raise FpdbError("MySQL connection failed")
|
||||
raise FpdbMySQLFailedError("MySQL connection failed")
|
||||
elif backend==fpdb_db.PGSQL:
|
||||
import psycopg2
|
||||
import psycopg2.extensions
|
||||
|
||||
Reference in New Issue
Block a user