core (memory/param): fix unproper use of Failure
This commit is contained in:
parent
4a201bc0f2
commit
033e18d996
1 changed files with 2 additions and 2 deletions
|
|
@ -186,9 +186,9 @@ class Params(object):
|
|||
"""
|
||||
if self.storage.hasProfile(profile):
|
||||
log.info(_("The profile name already exists"))
|
||||
return defer.fail(Failure(exceptions.ConflictError))
|
||||
return defer.fail(exceptions.ConflictError())
|
||||
if not self.host.trigger.point("ProfileCreation", profile):
|
||||
return defer.fail(Failure(exceptions.CancelError))
|
||||
return defer.fail(exceptions.CancelError())
|
||||
return self.storage.createProfile(profile, component or None)
|
||||
|
||||
def asyncDeleteProfile(self, profile, force=False):
|
||||
|
|
|
|||
Loading…
Reference in a new issue