Browse Source

Call DescPageBot in EuroExchangeBot

Issue #1 (https://git.golderweb.de/wiki/jogobot-euroexchange/issues/1)
develop
Jonathan Golder 6 years ago
parent
commit
ecb6bb8607
  1. 7
      euroexchange/euroexchange.py

7
euroexchange/euroexchange.py

@ -34,6 +34,7 @@ import pywikibot.specialbots
import jogobot
from config import Config
from descpage import DescPageBot
class EuroExchangeBotJob():
"""
@ -59,6 +60,9 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ):
# Init working directory
self.init_wdir()
# Prepare DescPage editing bot
self.descpagebot = DescPageBot( **kwargs )
super().__init__(**kwargs)
def run(self):
@ -257,6 +261,9 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ):
jogobot.output( "No update needed for Job {}".format(
self.current_job.image) )
# Update file description page
self.descpagebot.treat_job( self.current_job )
def image_update_needed( self ):
"""
Checks weather image update intervall is reached.

Loading…
Cancel
Save