comparison src/core/sat_main.py @ 471:6cd04adddaea

core: exceptions moved to core plugin group blog: group blog now manage public microblogs
author Goffi <goffi@goffi.org>
date Wed, 04 Apr 2012 00:06:44 +0200
parents 448ce3c9e2ac
children 2a072735e459
comparison
equal deleted inserted replaced
470:5c916b99d0f6 471:6cd04adddaea
41 41
42 import sys 42 import sys
43 import os.path 43 import os.path
44 44
45 from sat.core import xmpp 45 from sat.core import xmpp
46 from sat.core.exceptions import ProfileUnknownError
46 from sat.memory.memory import Memory 47 from sat.memory.memory import Memory
47 from sat.tools.xml_tools import tupleList2dataForm 48 from sat.tools.xml_tools import tupleList2dataForm
48 from sat.tools.misc import TriggerManager 49 from sat.tools.misc import TriggerManager
49 from glob import glob 50 from glob import glob
50 51
211 """ 212 """
212 213
213 profile = self.memory.getProfileName(profile_key) 214 profile = self.memory.getProfileName(profile_key)
214 if not profile: 215 if not profile:
215 error (_('Trying to connect a non-exsitant profile')) 216 error (_('Trying to connect a non-exsitant profile'))
216 return defer.fail() 217 raise ProfileUnknownError(profile_key)
217 218
218 if (self.isConnected(profile)): 219 if (self.isConnected(profile)):
219 info(_("already connected !")) 220 info(_("already connected !"))
220 return defer.succeed("None") 221 return defer.succeed("None")
221 222