BuildLangModel: printing a message when discarding a page.

This commit is contained in:
Jehan 2016-02-13 02:27:15 +01:00
parent 0446e24c8d
commit 27135a8880

View File

@ -233,6 +233,7 @@ def visit_pages(titles, depth, lang, logfd):
except (wikipedia.exceptions.PageError,
wikipedia.exceptions.DisambiguationError):
# Let's just discard a page when I get an exception.
print("Discarding page {}.\n".format(title))
continue
logfd.write("\n{} (revision {})".format(title, page.revision_id))