瀏覽代碼

Remove redundant 'seconds'; use int division.

tags/v0.1^2
Ben Kurtovic 12 年之前
父節點
當前提交
c1da237599
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      earwigbot/commands/lag.py
  2. +1
    -1
      earwigbot/commands/registration.py

+ 1
- 1
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)


+ 1
- 1
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")


Loading…
取消
儲存