diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index 4a5a0db3e..4ca45ff2f 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -284,12 +284,11 @@ class Channel(callbacks.Privmsg): # Check that they're not trying to make us kickban ourself. self.log.debug('In kban') if not irc.isNick(bannedNick): - self.log.warning(format('%q tried to kban a non nick: %q', - msg.prefix, bannedNick)) + self.log.warning('%q tried to kban a non nick: %q', + msg.prefix, bannedNick) raise callbacks.ArgumentError elif bannedNick == irc.nick: - self.log.warning(format('%q tried to make me kban myself.', - msg.prefix)) + self.log.warning('%q tried to make me kban myself.', msg.prefix) irc.error('I cowardly refuse to kickban myself.') return if not reason: @@ -326,8 +325,7 @@ class Channel(callbacks.Privmsg): # Check (again) that they're not trying to make us kickban ourself. if ircutils.hostmaskPatternEqual(banmask, irc.prefix): if ircutils.hostmaskPatternEqual(banmask, irc.prefix): - self.log.warning(format('%q tried to make me kban myself.', - msg.prefix)) + self.log.warning('%q tried to make me kban myself.',msg.prefix) irc.error('I cowardly refuse to ban myself.') return else: @@ -350,16 +348,15 @@ class Channel(callbacks.Privmsg): doBan() elif ircdb.checkCapability(msg.prefix, capability): if ircdb.checkCapability(bannedHostmask, capability): - self.log.warning( - format('%s tried to ban %q, but both have %s', - msg.prefix, bannedHostmask, capability)) + self.log.warning('%s tried to ban %q, but both have %s', + msg.prefix, bannedHostmask, capability) irc.error('%s has %s too, you can\'t ban him/her/it.' % (bannedNick, capability)) else: doBan() else: - self.log.warning(format('%q attempted kban without %s', - msg.prefix, capability)) + self.log.warning('%q attempted kban without %s', + msg.prefix, capability) irc.errorNoCapability(capability) exact,nick,user,host kban = wrap(kban, diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index 04be343d5..2c5ddeff4 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -184,7 +184,7 @@ class Math(callbacks.Privmsg): return str(x) text = self._mathRe.sub(handleMatch, text) try: - self.log.info(format('evaluating %q from %s', text, msg.prefix)) + self.log.info('evaluating %q from %s', text, msg.prefix) x = complex(eval(text, self._mathEnv, self._mathEnv)) irc.reply(self._complexToString(x)) except OverflowError: @@ -218,7 +218,7 @@ class Math(callbacks.Privmsg): return text = text.replace('lambda', '') try: - self.log.info(format('evaluating %q from %s', text, msg.prefix)) + self.log.info('evaluating %q from %s', text, msg.prefix) irc.reply(str(eval(text, self._mathEnv, self._mathEnv))) except OverflowError: maxFloat = math.ldexp(0.9999999999999999, 1024) diff --git a/src/callbacks.py b/src/callbacks.py index 77438ea61..12c8ee73a 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -489,8 +489,8 @@ class RichReplyMethods(object): if 'Raise' not in kwargs: kwargs['Raise'] = True if isinstance(capability, basestring): # checkCommandCapability! - log.warning(format('Denying %s for lacking %q capability.', - self.msg.prefix, capability)) + log.warning('Denying %s for lacking %q capability.', + self.msg.prefix, capability) if not self._getConfig(conf.supybot.reply.error.noCapability): v = self._getConfig(conf.supybot.replies.noCapability) s = self.__makeReply(v % capability, s) @@ -1285,8 +1285,8 @@ class PrivmsgRegexp(Privmsg): r = re.compile(value.__doc__, self.flags) self.res.append((r, name)) except re.error, e: - self.log.warning(format('Invalid regexp: %q (%s)', - value.__doc__, e)) + self.log.warning('Invalid regexp: %q (%s)', + value.__doc__, e) utils.gen.sortBy(operator.itemgetter(1), self.res) def callCommand(self, name, irc, msg, *L, **kwargs): diff --git a/src/ircdb.py b/src/ircdb.py index b6f44b029..441dce139 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -651,8 +651,7 @@ class UsersDictionary(utils.IterableMap): log.error('Multiple matches found in user database. ' 'Removing the offending hostmasks.') for (id, hostmask) in ids.iteritems(): - log.error(format('Removing %q from user %s.', hostmask, - id)) + log.error('Removing %q from user %s.', hostmask, id) self.users[id].removeHostmask(hostmask) raise DuplicateHostmask, 'Ids %r matched.' % ids else: # Not a hostmask, must be a name. @@ -851,7 +850,7 @@ class IgnoresDB(object): expiration = 0 self.add(hostmask, expiration) except Exception, e: - log.error(format('Invalid line in ignores database: %q', line)) + log.error('Invalid line in ignores database: %q', line) fd.close() def flush(self): diff --git a/src/irclib.py b/src/irclib.py index 835b70cbb..f9b11a7df 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -169,8 +169,7 @@ class IrcMsgQueue(object): if msg in self.msgs and \ not conf.supybot.protocols.irc.queueDuplicateMessages(): s = str(msg).strip() - log.info( - format('Not adding message %q to queue, already added.', s)) + log.info('Not adding message %q to queue, already added.', s) return False else: self.msgs.add(msg) diff --git a/src/plugin.py b/src/plugin.py index 27724bf9d..d3dac0592 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -48,7 +48,7 @@ def loadPluginModule(name, ignoreDeprecation=False): try: files.extend(os.listdir(dir)) except EnvironmentError: # OSError, IOError superclass. - log.warning(format('Invalid plugin directory: %s; removing.', dir)) + log.warning('Invalid plugin directory: %s; removing.', dir) conf.supybot.directories.plugins().remove(dir) loweredFiles = map(str.lower, files) try: diff --git a/src/test.py b/src/test.py index fccb7b78f..8d79fcd2b 100644 --- a/src/test.py +++ b/src/test.py @@ -96,7 +96,7 @@ class SupyTestCase(unittest.TestCase): def setUp(self): log.critical('Beginning test case %s', self.id()) threads = [t.getName() for t in threading.enumerate()] - log.critical(format('Threads: %L', threads)) + log.critical('Threads: %L', threads) unittest.TestCase.setUp(self) def tearDown(self):