1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/57c593cc70a1/ Changeset: 57c593cc70a1 User: dan Date: 2013-08-02 19:28:22 Summary: Explicitly set TEMP dir in Local Runner, when a temp dir value is not already set. Affected #: 1 file diff -r 22fb05ea1b47953070570e5622ea4e37ea87ac45 -r 57c593cc70a1de89f32e77833cbf1e329cf52c6b lib/galaxy/jobs/runners/local.py --- a/lib/galaxy/jobs/runners/local.py +++ b/lib/galaxy/jobs/runners/local.py @@ -26,11 +26,18 @@ def __init__( self, app, nworkers ): """Start the job runner """ + #create a local copy of os.environ to use as env for subprocess.Popen + self._environ = os.environ.copy() + # put lib into the PYTHONPATH for subprocesses - if 'PYTHONPATH' in os.environ: - os.environ['PYTHONPATH'] = '%s:%s' % ( os.environ['PYTHONPATH'], os.path.abspath( 'lib' ) ) + if 'PYTHONPATH' in self._environ: + self._environ['PYTHONPATH'] = '%s:%s' % ( self._environ['PYTHONPATH'], os.path.abspath( 'lib' ) ) else: - os.environ['PYTHONPATH'] = os.path.abspath( 'lib' ) + self._environ['PYTHONPATH'] = os.path.abspath( 'lib' ) + + #Set TEMP if a valid temp value is not already set + if not ( 'TMPDIR' in self._environ or 'TEMP' in self._environ or 'TMP' in self._environ ): + self._environ[ 'TEMP' ] = tempfile.gettempdir() super( LocalJobRunner, self ).__init__( app, nworkers ) self._init_worker_threads() @@ -57,7 +64,7 @@ cwd = job_wrapper.working_directory, stdout = stdout_file, stderr = stderr_file, - env = os.environ, + env = self._environ, preexec_fn = os.setpgrp ) job_wrapper.set_job_destination(job_wrapper.job_destination, proc.pid) job_wrapper.change_state( model.Job.states.RUNNING ) 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.