瀏覽代碼

Fix a bug regarding updating the 'all' site.

tags/v0.2
Ben Kurtovic 12 年之前
父節點
當前提交
6a381c66f1
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. +5
    -2
      earwigbot/wiki/copyvios/exclusions.py

+ 5
- 2
earwigbot/wiki/copyvios/exclusions.py 查看文件

@@ -31,7 +31,7 @@ from earwigbot import exceptions
__all__ = ["ExclusionsDB"]

default_sources = {
"all": [
"all": [ # Applies to all, but located on enwiki
"User:EarwigBot/Copyvios/Exclusions"
],
"enwiki": [
@@ -109,7 +109,10 @@ class ExclusionsDB(object):
query6 = "UPDATE updates SET update_time = ? WHERE update_sitename = ?;"
query7 = "INSERT INTO updates VALUES (?, ?);"

site = self._sitesdb.get_site(sitename)
if sitename == "all":
site = self._sitesdb.get_site("enwiki")
else:
site = self._sitesdb.get_site(sitename)
with sqlite.connect(self._dbfile) as conn, self._db_access_lock:
urls = set()
for (source,) in conn.execute(query1, (sitename,)):


Loading…
取消
儲存