Browse Source

Call pywikibot.handle_args before jogobot.status

To prevent pywikibot outputting a warning because of creating site
objects before handling args
develop test-v6
Jonathan Golder 8 years ago
parent
commit
2f022d9d30
  1. 6
      charts.py

6
charts.py

@ -194,6 +194,9 @@ def main(*args):
@type args: list of unicode
"""
# Process global arguments to determine desired site
local_args = pywikibot.handle_args(args)
# Get the jogobot-task_slug (basename of current file without ending)
task_slug = os.path.basename(__file__)[:-len(".py")]
@ -214,9 +217,6 @@ def main(*args):
# Bot/Task is active
else:
# Process global arguments to determine desired site
local_args = pywikibot.handle_args(args)
# This factory is responsible for processing command line arguments
# that are also used by other scripts and that determine on which pages
# to work on.

Loading…
Cancel
Save