bug fix; for issue introduced in r11387 and with this a partly revert of r11474 this bug fix avoids the recursion error and introduces a check when to output the header by checking whether the site object is available
bug fix; for issue introduced in r11387 and with this a partly revert of r11474
this bug fix avoids the recursion error and introduces a check when to output the header by checking whether the site object is available

pywikibot/core-migration-example