Commit 9691459d authored by Julien Muchembled's avatar Julien Muchembled

Rename mysqldb.py to mysql.py

parent 933412cd
......@@ -18,7 +18,7 @@ LOG_QUERIES = False
DATABASE_MANAGER_DICT = {
'Importer': 'importer.ImporterDatabaseManager',
'MySQL': 'mysqldb.MySQLDatabaseManager',
'MySQL': 'mysql.MySQLDatabaseManager',
'SQLite': 'sqlite.SQLiteDatabaseManager',
}
......
......@@ -25,7 +25,7 @@ from neo.lib.util import p64
from .. import DB_PREFIX, DB_USER, Patch, setupMySQLdb
from .testStorageDBTests import StorageDBTests
from neo.storage.database import DatabaseFailure
from neo.storage.database.mysqldb import MySQLDatabaseManager
from neo.storage.database.mysql import MySQLDatabaseManager
class ServerGone(object):
......
......@@ -335,18 +335,18 @@ class Application(StressApplication):
if kill_mysqld:
from neo.scripts import neostorage
from neo.storage.database import mysqldb
from neo.storage.database import mysql
neostorage_main = neostorage.main
self._kill_mysqld = kill_mysqld = SimpleQueue()
def main():
pid = os.getpid()
try:
neostorage_main()
except mysqldb.OperationalError as e:
except mysql.OperationalError as e:
code = e.args[0]
except mysqldb.MysqlError as e:
except mysql.MysqlError as e:
code = e.code
if mysqldb.SERVER_LOST != code != mysqldb.SERVER_GONE_ERROR:
if mysql.SERVER_LOST != code != mysql.SERVER_GONE_ERROR:
raise
kill_mysqld.put(pid)
neostorage.main = main
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment