Do not raise Exception when image not exists
Just output a warning and go on with further jobs
This commit is contained in:
@@ -238,11 +238,13 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
|
||||
self.current_job.filepage = pywikibot.page.FilePage(
|
||||
pywikibot.Site(), job.image)
|
||||
|
||||
# Stop if file not jet exists
|
||||
# Skip if file not yet exists
|
||||
if not self.current_job.filepage.exists():
|
||||
jogobot.output( "Work on Job {}".format( self.current_job.image),
|
||||
"ERROR" )
|
||||
raise pywikibot.NoPage( self.current_job.filepage )
|
||||
jogobot.output( "Image {} does not exists on wiki, job skipped!".
|
||||
format( self.current_job.image), "WARNING" )
|
||||
|
||||
return
|
||||
#~ raise pywikibot.NoPage( self.current_job.filepage )
|
||||
|
||||
# Check if update is necessary
|
||||
if self.image_update_needed():
|
||||
|
||||
Reference in New Issue
Block a user