Explorar el Código

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

pull/24/head
Ben Kurtovic hace 12 años
padre
commit
bcb1756510
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      pages/copyvios.mako

+ 3
- 1
pages/copyvios.mako Ver fichero

@@ -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:


Cargando…
Cancelar
Guardar