commit/galaxy-central: smcmanus: Minor tweak to exit code handling
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/e9587d2d241e/ changeset: e9587d2d241e user: smcmanus date: 2012-08-17 21:15:48 summary: Minor tweak to exit code handling affected #: 1 file diff -r 869163ea42946aa5c394d79a3366898cf59beeeb -r e9587d2d241eeca42dae6280388152a0f062e71a lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -490,7 +490,6 @@ if stderr contains anything, then False is returned. Note that the job id is just for messages. """ - err_msg = "" # By default, the tool succeeded. This covers the case where the code # has a bug but the tool was ok, and it lets a workflow continue. success = True @@ -507,7 +506,7 @@ # Check the exit code ranges in the order in which # they were specified. Each exit_code is a StdioExitCode # that includes an applicable range. If the exit code was in - # that range, then apply the error level and add in a message. + # that range, then apply the error level and add a message. # If we've reached a fatal error rule, then stop. max_error_level = galaxy.tools.StdioErrorLevel.NO_ERROR for stdio_exit_code in self.tool.stdio_exit_codes: @@ -515,20 +514,16 @@ tool_exit_code <= stdio_exit_code.range_end ): # Tack on a generic description of the code # plus a specific code description. For example, - # this might append "Job 42: Warning: Out of Memory\n". - # TODO: Find somewhere to stick the err_msg - - # possibly to the source (stderr/stdout), possibly - # in a new db column. + # this might prepend "Job 42: Warning: Out of Memory\n". code_desc = stdio_exit_code.desc if ( None == code_desc ): code_desc = "" - tool_msg = ( "Job %s: %s: Exit code %d: %s" % ( - job.get_id_tag(), - galaxy.tools.StdioErrorLevel.desc( tool_exit_code ), + tool_msg = ( "%s: Exit code %d: %s" % ( + galaxy.tools.StdioErrorLevel.desc( stdio_exit_code.error_level ), tool_exit_code, code_desc ) ) - log.info( tool_msg ) - stderr = err_msg + stderr + log.info( "Job %s: %s" % (job.get_id_tag(), tool_msg) ) + stderr = tool_msg + "\n" + stderr max_error_level = max( max_error_level, stdio_exit_code.error_level ) if ( max_error_level >= @@ -571,7 +566,6 @@ re.IGNORECASE ) if ( regex_match ): rexmsg = self.regex_err_msg( regex_match, regex) - # DELETEME log.info( "Job %s: %s" % ( job.get_id_tag(), rexmsg ) ) stderr = rexmsg + "\n" + stderr Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket