fix bug #3604180 for wikisource, patch submitted by betacommand. some PEP8 changes. update from trunk r11586
fix bug #3604180 for wikisource, patch submitted by betacommand.
some PEP8 changes.
update from trunk r11586

pywikibot/core-migration-example