ソースを参照

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

pull/24/head
Ben Kurtovic 14年前
親
コミット
bcb1756510
1個のファイルの変更、3行の追加、1行の削除
  1. +3
    -1
      pages/copyvios.mako

+ 3
- 1
pages/copyvios.mako ファイルの表示

@@ -17,7 +17,9 @@
if not site: if not site:
return None, None, None return None, None, None
page = site.get_page(title) 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 return site, page, None


# if url: # if url:


読み込み中…
キャンセル
保存