1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-17 17:57:23 +01:00

Fixed UP031 (printf-string-formatting): Use format specifiers instead of percent format

This commit is contained in:
Teal Dulcet
2025-01-12 06:36:07 -08:00
parent cd764e537d
commit 1d6560af4c
10 changed files with 37 additions and 37 deletions

View File

@@ -202,7 +202,7 @@ def get_current_migration():
ver = 0
while True:
next_ver = (ver + 1)
migration_func = globals().get("migration_%d" % next_ver)
migration_func = globals().get("migration_{:d}".format(next_ver))
if not migration_func:
return ver
ver = next_ver
@@ -234,14 +234,14 @@ def run_migrations():
while True:
next_ver = (ourver + 1)
migration_func = globals().get("migration_%d" % next_ver)
migration_func = globals().get("migration_{:d}".format(next_ver))
if not migration_func:
# No more migrations to run.
break
print()
print("Running migration to Mail-in-a-Box #%d..." % next_ver)
print("Running migration to Mail-in-a-Box #{:d}...".format(next_ver))
try:
migration_func(env)