def __init__(self, url):
        if url.startswith('mysql://'):
            try:
                import MySQLdb
                assert MySQLdb is not None # avoid warnings
            except __HOLE__:
                import pymysql_sa
                pymysql_sa.make_default_mysql_dialect()

        self.url = url
        self.config = Config(os.path.join(self.alembic_path, "alembic.ini"))
        self.config.set_main_option("script_location", self.alembic_path)
        self.config.set_main_option("url", self.url)
        self.config.set_main_option("sqlalchemy.url", self.url)
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/db/upgrade/__init__.py/DbParticularUpgrader.__init__