Stop using f-strings in Alembic migrations. Fixes #189
This commit is contained in:
@@ -93,7 +93,7 @@ def upgrade():
|
|||||||
username_template = mxtg_config.get("bridge.username_template", "telegram_{userid}")
|
username_template = mxtg_config.get("bridge.username_template", "telegram_{userid}")
|
||||||
hs_domain = mxtg_config["homeserver.domain"]
|
hs_domain = mxtg_config["homeserver.domain"]
|
||||||
localpart = username_template.format(userid="(.+)")
|
localpart = username_template.format(userid="(.+)")
|
||||||
mxid_regex = re.compile(f"@{localpart}:{hs_domain}")
|
mxid_regex = re.compile("@{}:{}".format(localpart, hs_domain))
|
||||||
for user in registrations:
|
for user in registrations:
|
||||||
match = mxid_regex.match(user)
|
match = mxid_regex.match(user)
|
||||||
if not match:
|
if not match:
|
||||||
|
|||||||
Reference in New Issue
Block a user