mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
travis.yml: Fix tests runner for Python 2.
This commit is contained in:
parent
9e4c804d24
commit
34b8e53c38
@ -12,4 +12,4 @@ install:
|
||||
script:
|
||||
- echo $TRAVIS_PYTHON_VERSION
|
||||
- python setup.py install
|
||||
- supybot-test test --plugins-dir=./build/lib/supybot/plugins/ --no-network --disable-multiprocessing
|
||||
- supybot-test test --plugins-dir=./build/lib*/supybot/plugins/ --no-network --disable-multiprocessing
|
||||
|
@ -262,7 +262,7 @@ class Karma(callbacks.Plugin):
|
||||
|
||||
def invalidCommand(self, irc, msg, tokens):
|
||||
channel = msg.args[0]
|
||||
if not irc.isChannel(channel):
|
||||
if not irc.isChannel(channel) or not tokens:
|
||||
return
|
||||
if tokens[-1][-2:] in ('++', '--'):
|
||||
thing = ' '.join(tokens)
|
||||
|
@ -88,6 +88,7 @@ class Misc(callbacks.Plugin):
|
||||
def invalidCommand(self, irc, msg, tokens):
|
||||
assert not msg.repliedTo, 'repliedTo msg in Misc.invalidCommand.'
|
||||
assert self is irc.callbacks[-1], 'Misc isn\'t last callback.'
|
||||
assert msg.command in ('PRIVMSG', 'NOTICE')
|
||||
self.log.debug('Misc.invalidCommand called (tokens %s)', tokens)
|
||||
# First, we check for invalidCommand floods. This is rightfully done
|
||||
# here since this will be the last invalidCommand called, and thus it
|
||||
@ -125,7 +126,9 @@ class Misc(callbacks.Plugin):
|
||||
banmasker = conf.supybot.protocols.irc.banmask.makeBanmask
|
||||
self.invalidCommands.enqueue(msg)
|
||||
if self.invalidCommands.len(msg) > maximum and \
|
||||
not ircdb.checkCapability(msg.prefix, 'owner'):
|
||||
not ircdb.checkCapability(msg.prefix, 'owner') and \
|
||||
msg.prefix != irc.prefix and \
|
||||
ircutils.isUserHostmask(msg.prefix):
|
||||
penalty = conf.supybot.abuse.flood.command.invalid.punishment()
|
||||
banmask = banmasker(msg.prefix, channel=None)
|
||||
self.log.info('Ignoring %s for %s seconds due to an apparent '
|
||||
|
Loading…
Reference in New Issue
Block a user