|
|
@ -203,15 +203,20 @@ class EuroExangeBot( pywikibot.bot.BaseBot ): |
|
|
|
@type job: EuroExangeBotJob |
|
|
|
""" |
|
|
|
|
|
|
|
# Store reference to current job in Bot obj |
|
|
|
self.current_job = job |
|
|
|
|
|
|
|
# Log job |
|
|
|
jogobot.output( "Work on Job {}".format(job.image) ) |
|
|
|
|
|
|
|
# Get file page |
|
|
|
filepage = pywikibot.page.FilePage(pywikibot.Site(), job.image) |
|
|
|
self.current_job.filepage = pywikibot.page.FilePage( |
|
|
|
pywikibot.Site(), job.image) |
|
|
|
|
|
|
|
# Stop if file not jet exists |
|
|
|
if not filepage.exists(): |
|
|
|
jogobot.output( "Work on Job {}".format(job.image), "ERROR" ) |
|
|
|
if not self.current_job.filepage.exists(): |
|
|
|
jogobot.output( "Work on Job {}".format( self.current_job.image), |
|
|
|
"ERROR" ) |
|
|
|
raise pywikibot.NoPage( filepage ) |
|
|
|
|
|
|
|
self.call_gnuplot( job ) |
|
|
|