mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-08 16:27:24 +01:00
Fixed TRY003 (raise-vanilla-args): Avoid specifying long messages outside the exception class
This commit is contained in:
@@ -86,7 +86,9 @@ def migration_7(env):
|
||||
if newemail != email:
|
||||
c = conn.cursor()
|
||||
c.execute("UPDATE aliases SET source=? WHERE source=?", (newemail, email))
|
||||
if c.rowcount != 1: raise ValueError("Alias not found.")
|
||||
if c.rowcount != 1:
|
||||
msg = "Alias not found."
|
||||
raise ValueError(msg)
|
||||
print("Updated alias", email, "to", newemail)
|
||||
except Exception as e:
|
||||
print("Error updating IDNA alias", email, e)
|
||||
|
||||
Reference in New Issue
Block a user