From 2f022d9d304e6c56c2c22c83112defd837712999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Sat, 16 Jul 2016 16:00:30 +0200 Subject: [PATCH] Call pywikibot.handle_args before jogobot.status To prevent pywikibot outputting a warning because of creating site objects before handling args --- charts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts.py b/charts.py index f1befb0..6947711 100644 --- a/charts.py +++ b/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.