瀏覽代碼

Fix datetime usage, indexing.

pull/15/head
Ben Kurtovic 11 年之前
父節點
當前提交
4e4f0bb783
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      tasks/afc_statistics.py

+ 3
- 2
tasks/afc_statistics.py 查看文件

@@ -655,8 +655,9 @@ class AFCStatistics(Task):
ORDER BY ABS(rev_timestamp - ?) ASC LIMIT 1"""
result = self.site.sql_query(query, (pageid, user, stamp, stamp))
try:
return user, stamp, list(result)[0]
except IndexError:
dtime = datetime.strptime(stamp, "%Y%m%d%H%M%S")
return user, dtime, list(result)[0][0]
except (ValueError, IndexError):
return None

def _search_history(self, pageid, chart, search_with, search_without):


Loading…
取消
儲存