misc bugfixes

- wix: added forgotten profile in gateways management
- xml_tools: removed XMLClass to the 2 methods as a direct methods
- plugin_xep_100 (gateways discovery): added error callback
This commit is contained in:
Goffi 2010-06-22 13:58:53 +08:00
commit 2f2594de6b
10 changed files with 112 additions and 91 deletions

10
sat.tac
View file

@ -47,7 +47,7 @@ import signal, sys
import os.path
from tools.memory import Memory
from tools.xml_tools import XMLTools
from tools.xml_tools import tupleList2dataForm
from glob import glob
import gettext
@ -527,7 +527,7 @@ class SAT(service.Service):
iq["from"] = self.profiles[profile].jid.full()
query = iq.addElement(('jabber:iq:register', 'query'))
if action=='SUBMIT':
form = XMLTools.tupleList2dataForm(fields)
form = tupleList2dataForm(fields)
query.addChild(form.toElement())
elif action=='CANCEL':
query.addElement('remove')
@ -774,12 +774,12 @@ class SAT(service.Service):
if not profile_key:
error (_('Non-exsitant profile'))
return ""
try:
if self.menus.has_key((category,name,type)):
id = self.get_next_id()
self.menus[(category,name,type)]['callback'](id, profile)
return id
except KeyError:
error (_("Trying to access an unknown menu"))
else:
error (_("Trying to access an unknown menu (%(category)s/%(name)s/%(type)s)")%{'category':category, 'name':name,'type':type})
return ""