core: misc bug fixes
This commit is contained in:
parent
c584a689aa
commit
92d861f334
1 changed files with 4 additions and 3 deletions
|
|
@ -25,6 +25,7 @@ from xml.dom import minidom
|
|||
from logging import debug, info, warning, error
|
||||
from twisted.internet import defer
|
||||
from twisted.words.protocols.jabber import jid
|
||||
from twisted.python.failure import Failure
|
||||
from sat.tools.xml_tools import paramsXml2xmlUI
|
||||
from sat.core.default_config import default_config
|
||||
from sat.memory.sqlite import SqliteStorage
|
||||
|
|
@ -161,9 +162,9 @@ class Params(object):
|
|||
"""
|
||||
if self.storage.hasProfile(profile):
|
||||
info(_('The profile name already exists'))
|
||||
return defer.fail("CONFLICT")
|
||||
return defer.fail(Failure(u"CONFLICT"))
|
||||
if not self.host.trigger.point("ProfileCreation", profile):
|
||||
return defer.fail("CANCEL")
|
||||
return defer.fail(Failure(u"CANCEL"))
|
||||
return self.storage.createProfile(profile)
|
||||
|
||||
def deleteProfile(self, profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue