Browse Source

redfam: Check if moved page exists

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

Issue #71 (https://git.golderweb.de/wiki/jogobot-red/issues/71)
develop
Jonathan Golder 6 years ago
parent
commit
14db996a43
  1. 5
      lib/redfam.py

5
lib/redfam.py

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

Loading…
Cancel
Save