浏览代码

Bugfixes.

master
Ben Kurtovic 8 年前
父节点
当前提交
54387edb08
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      tif/calc.py

+ 2
- 2
tif/calc.py 查看文件

@@ -111,7 +111,7 @@ def _format_time(cache_time):

def _get_protection(page):
edit = [prot for prot in page.protection if prot["type"] == "edit"]
return edit or None
return edit[0] if edit else None

def calculate_tif(title):
bot = Bot(".earwigbot")
@@ -131,5 +131,5 @@ def calculate_tif(title):
result["protection"] = _get_protection(page)
if cache_time:
result["cache_time"] = cache_time.strftime("%b %d, %Y %H:%M:%S UTC")
result["cache_ago"] = _format_time(cache_time)
result["cache_age"] = _format_time(cache_time)
return result

正在加载...
取消
保存