From 2e2827717dc987394c6892a48fd550e8c433d89c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 10 Sep 2019 22:54:14 +0300 Subject: [PATCH] Escape percent sign in alembic options. Fixes #362 --- alembic/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alembic/env.py b/alembic/env.py index 7d7e8967..2fe2d45b 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -19,7 +19,7 @@ config = context.config mxtg_config_path = context.get_x_argument(as_dictionary=True).get("config", "config.yaml") mxtg_config = Config(mxtg_config_path, None, None) mxtg_config.load() -config.set_main_option("sqlalchemy.url", mxtg_config["appservice.database"]) +config.set_main_option("sqlalchemy.url", mxtg_config["appservice.database"].replace("%", "%%")) AlchemySessionContainer.create_table_classes(None, "telethon_", Base)