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

View File

@ -760,7 +760,7 @@ class Database:
if 'dropHudCache' not in settings or settings['dropHudCache'] != 'drop': if 'dropHudCache' not in settings or settings['dropHudCache'] != 'drop':
self.storeHudCache(self.backend, base, category, gametype_id, hand_start_time, player_ids, hudImportData) self.storeHudCache(self.backend, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
t5 = time() t5 = time()
#print "fills=(%4.3f) saves=(%4.3f,%4.3f,%4.3f)" % (t2-t0, t3-t2, t4-t3, t5-t4) print "fills=(%4.3f) saves=(%4.3f,%4.3f,%4.3f)" % (t2-t0, t3-t2, t4-t3, t5-t4)
return hands_id return hands_id
#end def ring_holdem_omaha #end def ring_holdem_omaha

View File

@ -557,7 +557,7 @@ class fpdb:
self.warning_box("MySQL Server reports: Access denied. Are your permissions set correctly?") self.warning_box("MySQL Server reports: Access denied. Are your permissions set correctly?")
exit() exit()
except Exceptions.FpdbMySQLNoDatabase: except Exceptions.FpdbMySQLNoDatabase:
msg = "MySQL client reports: 2002 error. Unable to connect - Please check that the MySQL service has been started" msg = "MySQL client reports: 2002 or 2003 error. Unable to connect - Please check that the MySQL service has been started"
self.warning_box(msg) self.warning_box(msg)
exit exit

View File

@ -106,7 +106,7 @@ class fpdb_db:
except MySQLdb.Error, ex: except MySQLdb.Error, ex:
if ex.args[0] == 1045: if ex.args[0] == 1045:
raise FpdbMySQLAccessDenied(ex.args[0], ex.args[1]) 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]) raise FpdbMySQLNoDatabase(ex.args[0], ex.args[1])
else: else:
print "*** WARNING UNKNOWN MYSQL ERROR", ex print "*** WARNING UNKNOWN MYSQL ERROR", ex