瀏覽代碼

Properly handle unset timestamps.

pull/15/head
Ben Kurtovic 10 年之前
父節點
當前提交
ce7d42badd
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      tasks/afc_undated.py

+ 4
- 2
tasks/afc_undated.py 查看文件

@@ -99,12 +99,12 @@ class AFCUndated(Task):
elif is_talk:
aliases = self.aliases["talk"]
timestamp, reviewer = self.get_talkdata(page)
if not timestamp:
return
else:
msg = u"[[{0}]] is undated, but in a namespace I don't know how to process"
self.logger.warn(msg.format(page.title))
return
if not timestamp:
return

code = mwparserfromhell.parse(page.get())
changes = 0
@@ -119,6 +119,8 @@ class AFCUndated(Task):
else:
timestamp = self.get_timestamp(page, status)
timestamps[status] = timestamp
if not timestamp:
continue
template.add("ts", timestamp)
if is_talk and not has_reviewer:
template.add("reviewer", reviewer)


Loading…
取消
儲存