https://bugzilla.wikimedia.org/show_bug.cgi?id=72120
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- A better pattern to use and promote is:
local_args = pywikibot.handleArgs() site = pywikibot.Site() genFactory = pagegenerators.GeneratorFactory(site) for arg in local_args: if genFactory.handleArg(arg): pass ...
As that shows the fact that genFactory needs a site object.