Mercurial > libervia-backend
diff src/memory/memory.py @ 645:17bd09cd1001
core: misc bug fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 21 Sep 2013 15:34:10 +0200 |
parents | 262d9d9ad27a |
children | 7d6e5807504a |
line wrap: on
line diff
--- a/src/memory/memory.py Sun Sep 08 14:59:14 2013 +0200 +++ b/src/memory/memory.py Sat Sep 21 15:34:10 2013 +0200 @@ -25,6 +25,7 @@ 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 @@ """ 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):