changeset 645:17bd09cd1001

core: misc bug fixes
author Goffi <goffi@goffi.org>
date Sat, 21 Sep 2013 15:34:10 +0200
parents 53de6954e94e
children f7804c52c754
files src/memory/memory.py src/tools/xml_tools.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
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):
--- a/src/tools/xml_tools.py	Sun Sep 08 14:59:14 2013 +0200
+++ b/src/tools/xml_tools.py	Sat Sep 21 15:34:10 2013 +0200
@@ -21,7 +21,7 @@
 from xml.dom import minidom
 from wokkel import data_form
 from twisted.words.xish import domish
-from core import exceptions
+from sat.core import exceptions
 
 """This library help manage XML used in SàT (parameters, registration, etc) """