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 ...@@ -18,7 +18,7 @@ LOG_QUERIES = False
DATABASE_MANAGER_DICT = { DATABASE_MANAGER_DICT = {
'Importer': 'importer.ImporterDatabaseManager', 'Importer': 'importer.ImporterDatabaseManager',
'MySQL': 'mysqldb.MySQLDatabaseManager', 'MySQL': 'mysql.MySQLDatabaseManager',
'SQLite': 'sqlite.SQLiteDatabaseManager', 'SQLite': 'sqlite.SQLiteDatabaseManager',
} }
......
...@@ -25,7 +25,7 @@ from neo.lib.util import p64 ...@@ -25,7 +25,7 @@ from neo.lib.util import p64
from .. import DB_PREFIX, DB_USER, Patch, setupMySQLdb from .. import DB_PREFIX, DB_USER, Patch, setupMySQLdb
from .testStorageDBTests import StorageDBTests from .testStorageDBTests import StorageDBTests
from neo.storage.database import DatabaseFailure from neo.storage.database import DatabaseFailure
from neo.storage.database.mysqldb import MySQLDatabaseManager from neo.storage.database.mysql import MySQLDatabaseManager
class ServerGone(object): class ServerGone(object):
......
...@@ -335,18 +335,18 @@ class Application(StressApplication): ...@@ -335,18 +335,18 @@ class Application(StressApplication):
if kill_mysqld: if kill_mysqld:
from neo.scripts import neostorage from neo.scripts import neostorage
from neo.storage.database import mysqldb from neo.storage.database import mysql
neostorage_main = neostorage.main neostorage_main = neostorage.main
self._kill_mysqld = kill_mysqld = SimpleQueue() self._kill_mysqld = kill_mysqld = SimpleQueue()
def main(): def main():
pid = os.getpid() pid = os.getpid()
try: try:
neostorage_main() neostorage_main()
except mysqldb.OperationalError as e: except mysql.OperationalError as e:
code = e.args[0] code = e.args[0]
except mysqldb.MysqlError as e: except mysql.MysqlError as e:
code = e.code code = e.code
if mysqldb.SERVER_LOST != code != mysqldb.SERVER_GONE_ERROR: if mysql.SERVER_LOST != code != mysql.SERVER_GONE_ERROR:
raise raise
kill_mysqld.put(pid) kill_mysqld.put(pid)
neostorage.main = main 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