argh at whitespace churn, do i have my editor settings screwey?

trap error 2003 on mysql connect (same as 2002, but for tcp)
This commit is contained in:
Eric Blade
2009-12-01 06:58:33 -05:00
parent 9953e76c9e
commit bec343abfd
3 changed files with 137 additions and 137 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ class fpdb_db:
except MySQLdb.Error, ex:
if ex.args[0] == 1045:
raise FpdbMySQLAccessDenied(ex.args[0], ex.args[1])
elif ex.args[0] == 2002:
elif ex.args[0] == 2002 or ex.args[0] == 2003: # 2002 is no unix socket, 2003 is no tcp socket
raise FpdbMySQLNoDatabase(ex.args[0], ex.args[1])
else:
print "*** WARNING UNKNOWN MYSQL ERROR", ex