5 Commits
v0.2 ... master

Author SHA1 Message Date
670e28d84f Compatibility issue with recent pywikibot fixed 2022-05-29 16:47:56 +02:00
d668817e6c Merge branch 'release-0.2.1' 2021-03-06 17:39:47 +01:00
aee4986957 Prepare release v0.2.1 2021-03-06 17:39:14 +01:00
eed989fd2a euroexchange: Fix removed APISite.getcurrenttime()
Pywikibot removed method  APISite.getcurrenttime replaced with
APISite.server_time
2021-03-06 17:35:02 +01:00
59aaac408d Merge branch 'release-0.2' back into develop 2018-10-21 20:06:02 +02:00
2 changed files with 15 additions and 9 deletions

View File

@@ -25,6 +25,12 @@ python euroexchange.py
- Checks gnuplot exitcode and only upload chart if successfull created
- Update gnuplot script on commons file description page
* 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)
@@ -32,4 +38,4 @@ python euroexchange.py
GPLv3+
## Author Information
Copyright 2018 Jonathan Golder <jonathan@golderweb.de>
Copyright 2022 Jonathan Golder <jonathan@golderweb.de>

View File

@@ -276,7 +276,7 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ):
last_update = self.current_job.filepage.latest_file_info.timestamp
# Get current time
now = pywikibot.Site().getcurrenttime()
now = pywikibot.Site().server_time()
# Calculate allowed delta (with tolerance)
delta = datetime.timedelta( days=self.current_job.freq, hours=-2 )
@@ -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,
)