core: fix failure raising with exception classes:

When raising a `Failure` with an exception, the `Exception` class can't be used, it must
be an instance.
This commit is contained in:
Goffi 2026-03-30 12:03:16 +02:00
commit d3113ed2d8

View file

@ -224,7 +224,7 @@ class MiscAccount(object):
raise exceptions.DataError
if profile.lower() in RESERVED_LIST:
return defer.fail(Failure(exceptions.ConflictError))
return defer.fail(Failure(exceptions.ConflictError()))
d = self.host.memory.create_profile(profile, password)
d.addCallback(lambda __: self.profile_created(password, jid_s, profile))