comparison src/plugins/plugin_xep_0234.py @ 1566:ec3848916ee8

plugin ip: implemented XEP-0279 for external ip retrieval + fixed bad exception handling
author Goffi <goffi@goffi.org>
date Sun, 08 Nov 2015 14:44:30 +0100
parents 22f0307864b4
children 268fda4236ca
comparison
equal deleted inserted replaced
1565:d86685c0c019 1566:ec3848916ee8
28 from sat.tools import utils 28 from sat.tools import utils
29 import os.path 29 import os.path
30 from twisted.words.xish import domish 30 from twisted.words.xish import domish
31 from twisted.words.protocols.jabber import jid 31 from twisted.words.protocols.jabber import jid
32 from twisted.python import failure 32 from twisted.python import failure
33 33 from twisted.words.protocols.jabber.xmlstream import XMPPHandler
34 try:
35 from twisted.words.protocols.xmlstream import XMPPHandler
36 except ImportError:
37 from wokkel.subprotocols import XMPPHandler
38 34
39 35
40 NS_JINGLE_FT = 'urn:xmpp:jingle:apps:file-transfer:4' 36 NS_JINGLE_FT = 'urn:xmpp:jingle:apps:file-transfer:4'
41 CONFIRM = D_(u'{entity} wants to send the file "{name}" to you:\n{desc}\n\nThe file has a size of {size_human}\n\nDo you accept ?') 37 CONFIRM = D_(u'{entity} wants to send the file "{name}" to you:\n{desc}\n\nThe file has a size of {size_human}\n\nDo you accept ?')
42 CONFIRM_TITLE = D_(u'Confirm file transfer') 38 CONFIRM_TITLE = D_(u'Confirm file transfer')