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

@ -207,7 +207,7 @@ class Params(object):
self.host.disconnect(profile)
else:
log.info(_("Trying to delete a connected profile"))
return defer.fail(Failure(exceptions.ProfileConnected))
return defer.fail(Failure(exceptions.ProfileConnected()))
return self.storage.delete_profile(profile)
def get_profile_name(self, profile_key, return_profile_keys=False):