Call pywikibot.handle_args before jogobot.status

To prevent pywikibot outputting a warning because of creating site
objects before handling args
This commit is contained in:
2016-07-16 16:00:30 +02:00
parent 56701107db
commit 2f022d9d30

View File

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