Explorar el Código

Bugfixes.

master
Ben Kurtovic hace 8 años
padre
commit
54387edb08
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      tif/calc.py

+ 2
- 2
tif/calc.py Ver fichero

@@ -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

Cargando…
Cancelar
Guardar