renamed tools.misc to tools.trigger
This commit is contained in:
parent
66230e2156
commit
76065758df
3 changed files with 13 additions and 13 deletions
|
|
@ -23,7 +23,7 @@ log = getLogger(__name__)
|
|||
from twisted.words.protocols.jabber import jid
|
||||
from twisted.internet import reactor, protocol
|
||||
|
||||
from sat.tools.misc import SkipOtherTriggers
|
||||
from sat.tools import trigger
|
||||
from sat.tools.utils import clean_ustr
|
||||
|
||||
PLUGIN_INFO = {
|
||||
|
|
@ -57,10 +57,10 @@ class ExportCommandProtocol(protocol.ProcessProtocol):
|
|||
log.info("connectionMade :)")
|
||||
|
||||
def outReceived(self, data):
|
||||
self.parent.host.sendMessage(self.target, self._clean(data), no_trigger=True, profile_key=self.profile)
|
||||
self.parent.host.sendMessage(self.target, self._clean(data), no_trigger=True, profile_key=self.profile)
|
||||
|
||||
def errReceived(self, data):
|
||||
self.parent.host.sendMessage(self.target, self._clean(data), no_trigger=True, profile_key=self.profile)
|
||||
self.parent.host.sendMessage(self.target, self._clean(data), no_trigger=True, profile_key=self.profile)
|
||||
|
||||
def processEnded(self, reason):
|
||||
log.info (u"process finished: %d" % (reason.value.exitCode,))
|
||||
|
|
@ -124,7 +124,7 @@ class CommandExport(object):
|
|||
_continue &= process.boolOption("continue")
|
||||
exclusive |= process.boolOption("exclusive")
|
||||
if exclusive:
|
||||
raise SkipOtherTriggers
|
||||
raise trigger.SkipOtherTriggers
|
||||
return _continue
|
||||
|
||||
return True
|
||||
|
|
@ -144,7 +144,7 @@ class CommandExport(object):
|
|||
if not profile:
|
||||
log.warning("Unknown profile [%s]" % (profile,))
|
||||
return
|
||||
|
||||
|
||||
for target in targets:
|
||||
try:
|
||||
_jid = jid.JID(target)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ log = getLogger(__name__)
|
|||
from twisted.words.protocols.jabber import jid
|
||||
|
||||
from sat.core.exceptions import UnknownEntityError
|
||||
#from sat.tools.misc import SkipOtherTriggers
|
||||
#from sat.tools import trigger
|
||||
|
||||
PLUGIN_INFO = {
|
||||
"name": "Parrot Plugin",
|
||||
|
|
@ -66,7 +66,7 @@ class Exp_Parrot(object):
|
|||
#
|
||||
# if mess_data['to'].userhostJID() in _links.values():
|
||||
# log.debug("Parrot link detected, skipping other triggers")
|
||||
# raise SkipOtherTriggers
|
||||
# raise trigger.SkipOtherTriggers
|
||||
|
||||
def MessageReceivedTrigger(self, message, post_treat, profile):
|
||||
""" Check if source is linked and repeat message, else do nothing """
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ except ImportError:
|
|||
from twisted.words.xish import domish
|
||||
from twisted.internet import defer
|
||||
|
||||
from sat.tools.misc import TriggerManager
|
||||
from sat.tools import trigger
|
||||
from time import time
|
||||
|
||||
# TODO: fix Prosody "addressing" plugin to leave the concerned bcc according to the spec:
|
||||
|
|
@ -72,7 +72,7 @@ class XEP_0033(object):
|
|||
log.info(_("Extended Stanza Addressing plugin initialization"))
|
||||
self.host = host
|
||||
self.internal_data = {}
|
||||
host.trigger.add("sendMessage", self.sendMessageTrigger, TriggerManager.MIN_PRIORITY)
|
||||
host.trigger.add("sendMessage", self.sendMessageTrigger, trigger.TriggerManager.MIN_PRIORITY)
|
||||
host.trigger.add("MessageReceived", self.messageReceivedTrigger)
|
||||
|
||||
def sendMessageTrigger(self, mess_data, pre_xml_treatments, post_xml_treatments, profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue