redfam: Check if moved page exists

To prevent creation of orphaned diskpages in case of special movement
constructs

Issue #71 (#71)
This commit is contained in:
2018-08-12 11:39:33 +02:00
parent 110589cb5b
commit 14db996a43

View File

@@ -598,6 +598,11 @@ class RedFamWorker( RedFam ):
if self.article_has_status( "redirect", title=article ):
try:
page = page.moved_target()
# Short circuit if movement destination does not exists
if not page.exists():
continue
except pywikibot.exceptions.NoMoveTarget:
pass