From 670e28d84f17ade73bc08eb33cd866162acf8ac7 Mon Sep 17 00:00:00 2001 From: Jonathan Golder Date: Sun, 29 May 2022 16:47:56 +0200 Subject: [PATCH] Compatibility issue with recent pywikibot fixed --- README.md | 5 ++++- euroexchange/euroexchange.py | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 96adf89..a3b947a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ python euroexchange.py * 0.2.1 - Compatibility issue with recent pywikibot fixed +* 0.2.2 + - Compatibility issue with recent pywikibot fixed + ## Bugs [jogobot-euroexchange Issues](https://git.golderweb.de/wiki/jogobot-euroexchange/issues) @@ -35,4 +38,4 @@ python euroexchange.py GPLv3+ ## Author Information -Copyright 2018 Jonathan Golder +Copyright 2022 Jonathan Golder diff --git a/euroexchange/euroexchange.py b/euroexchange/euroexchange.py index c7f9edc..7f31962 100644 --- a/euroexchange/euroexchange.py +++ b/euroexchange/euroexchange.py @@ -338,17 +338,17 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ): verifyDescription = True #set to False to skip double-checking/editing description => change to bot-mode ignoreWarning = [ "exists", "duplicate", ] #set to True to skip warnings, Upload even if another file would be overwritten or another mistake would be risked targetSite = pywikibot.Site() - always = self.getOption("always") - aborts = True if self.getOption("always") else list() + always = self.opt.always + aborts = True if self.opt.always else list() bot = pywikibot.specialbots.UploadRobot( filepath, description=comment, - useFilename=filename, - keepFilename=keepFilename, - verifyDescription=verifyDescription, - ignoreWarning=ignoreWarning, - targetSite = targetSite, + use_filename=filename, + keep_filename=keepFilename, + verify_description=verifyDescription, + ignore_warning=ignoreWarning, + target_site = targetSite, always=always, aborts=aborts, )