From 8d287c2f661fb9a1ef21009262df1684778dc485 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 15 Mar 2003 11:51:16 +0000 Subject: [PATCH] Fixed bad pluralization in cpustats --- plugins/FunCommands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/FunCommands.py b/plugins/FunCommands.py index dbe780dde..65a4e322e 100644 --- a/plugins/FunCommands.py +++ b/plugins/FunCommands.py @@ -214,16 +214,17 @@ class FunCommands(callbacks.Privmsg): "takes no arguments" (user, system, childUser, childSystem, elapsed) = os.times() timeRunning = time.time() - self._startTime + threads = threading.activeCount() response ='I have taken %s seconds of user time and %s seconds of '\ 'system time, for a total of %s seconds of CPU time. My '\ 'children have taken %s seconds of user time and %s seconds'\ ' of system time for a total of %s seconds of CPU time. ' \ 'I\'ve taken a total of %s%% of this computer\'s time. ' \ - 'I currently have %s active threads.' %\ + 'I currently have %s active %s.' %\ (user, system, user + system, childUser, childSystem, childUser + childSystem, (user+system+childUser+childSystem)/timeRunning, - threading.activeCount()) + threads, threads == 1 and 'thread' or 'threads') irc.reply(msg, response) def uptime(self, irc, msg, args):