Merge branch 'i#2-check-gnuplot-exit' into develop
This commit is contained in:
@@ -247,6 +247,7 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ):
|
|||||||
|
|
||||||
# Check if update is necessary
|
# Check if update is necessary
|
||||||
if self.image_update_needed():
|
if self.image_update_needed():
|
||||||
|
try:
|
||||||
self.call_gnuplot( job )
|
self.call_gnuplot( job )
|
||||||
|
|
||||||
if self.file_changed():
|
if self.file_changed():
|
||||||
@@ -255,6 +256,10 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ):
|
|||||||
jogobot.output( "No upload needed for Job {}.".format(
|
jogobot.output( "No upload needed for Job {}.".format(
|
||||||
self.current_job.image) )
|
self.current_job.image) )
|
||||||
|
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
jogobot.output( "Subprocess terminated with exit code {}!".
|
||||||
|
format( e.returncode), "ERROR" )
|
||||||
|
|
||||||
# Nothing to do
|
# Nothing to do
|
||||||
else:
|
else:
|
||||||
jogobot.output( "No update needed for Job {}".format(
|
jogobot.output( "No update needed for Job {}".format(
|
||||||
@@ -299,7 +304,7 @@ class EuroExchangeBot( pywikibot.bot.BaseBot ):
|
|||||||
plt_env["INFILE"] = type(self).csv_file
|
plt_env["INFILE"] = type(self).csv_file
|
||||||
plt_env["OUTFILE"] = job.image
|
plt_env["OUTFILE"] = job.image
|
||||||
|
|
||||||
subprocess.call( cmd, cwd=self.wdir, env=plt_env )
|
subprocess.check_call( cmd, cwd=self.wdir, env=plt_env )
|
||||||
|
|
||||||
def file_changed( self ):
|
def file_changed( self ):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user