瀏覽代碼

Check existence in a way that we won't make unnecessary queries.

pull/24/head
Ben Kurtovic 12 年之前
父節點
當前提交
bcb1756510
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      pages/copyvios.mako

+ 3
- 1
pages/copyvios.mako 查看文件

@@ -17,7 +17,9 @@
if not site:
return None, None, None
page = site.get_page(title)
if page.exists in [page.PAGE_MISSING, page.PAGE_INVALID]:
try:
page.get() # Make sure that the page exists before we check it!
except (exceptions.PageNotFoundError, exceptions.InvalidPageError):
return site, page, None

# if url:


Loading…
取消
儲存