From c1da237599d8930f207826467cb7da07c1be5b37 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 16 Jul 2012 17:32:35 -0400 Subject: [PATCH] Remove redundant 'seconds'; use int division. --- earwigbot/commands/lag.py | 2 +- earwigbot/commands/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/commands/lag.py b/earwigbot/commands/lag.py index 5b084cb..9f6e272 100644 --- a/earwigbot/commands/lag.py +++ b/earwigbot/commands/lag.py @@ -33,7 +33,7 @@ class Lag(Command): if not site: return - msg = "\x0302{0}\x0F: Toolserver replag is {1} seconds; database maxlag is {2} seconds." + msg = "\x0302{0}\x0F: Toolserver replag is {1}; database maxlag is {2}." replag, maxlag = site.get_replag(), site.get_maxlag() msg = msg.format(site.name, self.format(replag), self.format(maxlag)) self.reply(data, msg) diff --git a/earwigbot/commands/registration.py b/earwigbot/commands/registration.py index 8180281..20477d6 100644 --- a/earwigbot/commands/registration.py +++ b/earwigbot/commands/registration.py @@ -64,7 +64,7 @@ class Registration(Command): ("minute", 60), ("second", 1)] msg = [] for name, size in parts: - num = (t2 - t1) / size + num = int(t2 - t1) / size t1 += num * size if num: chunk = "{0} {1}".format(num, name if num == 1 else name + "s")