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(
|
self.current_job.filepage = pywikibot.page.FilePage(
|
||||||
pywikibot.Site(), job.image)
|
pywikibot.Site(), job.image)
|
||||||
|
|
||||||
# Stop if file not jet exists
|
# Skip if file not yet exists
|
||||||
if not self.current_job.filepage.exists():
|
if not self.current_job.filepage.exists():
|
||||||
jogobot.output( "Work on Job {}".format( self.current_job.image),
|
jogobot.output( "Image {} does not exists on wiki, job skipped!".
|
||||||
"ERROR" )
|
format( self.current_job.image), "WARNING" )
|
||||||
raise pywikibot.NoPage( self.current_job.filepage )
|
|
||||||
|
return
|
||||||
|
#~ raise pywikibot.NoPage( self.current_job.filepage )
|
||||||
|
|
||||||
# Check if update is necessary
|
# Check if update is necessary
|
||||||
if self.image_update_needed():
|
if self.image_update_needed():
|
||||||
|
|||||||
Reference in New Issue
Block a user