plugin import: fixed deserialisation of pubsub service
This commit is contained in:
parent
a8b302b27d
commit
a6e55a6c56
1 changed files with 3 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ from sat.core.log import getLogger
|
|||
log = getLogger(__name__)
|
||||
from twisted.internet import defer
|
||||
from sat.core import exceptions
|
||||
from twisted.words.protocols.jabber import jid
|
||||
from functools import partial
|
||||
import collections
|
||||
import uuid
|
||||
|
|
@ -116,7 +117,8 @@ class ImportPlugin(object):
|
|||
options[option] = json.loads(options[option])
|
||||
except ValueError:
|
||||
raise exceptions.DataError(_(u'invalid json option: {name}').format(name=option))
|
||||
return self.doImport(client, import_handler, unicode(name), unicode(location), options, pubsub_service or None, pubsub_node or None)
|
||||
pubsub_service = jid.JID(pubsub_service) if pubsub_service else None
|
||||
return self.doImport(client, import_handler, unicode(name), unicode(location), options, pubsub_service, pubsub_node or None)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def doImport(self, client, import_handler, name, location, options=None, pubsub_service=None, pubsub_node=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue