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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user