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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user