diff --git a/src/omero/processor.py b/src/omero/processor.py index 978dc80e1..3c534efdb 100755 --- a/src/omero/processor.py +++ b/src/omero/processor.py @@ -147,23 +147,37 @@ def __init__(self, ctx, interpreter, properties, params, iskill=False, # def make_env(self): - self.env = omero.util.Environment( - "CLASSPATH", - "DISPLAY", - "DYLD_LIBRARY_PATH", - "HOME", - "JYTHON_HOME", - "LC_ALL", - "LANG", - "LANGUAGE", - "LD_LIBRARY_PATH", - "MLABRAW_CMD_STR", - "OMERODIR", - "OMERO_TEMPDIR", - "OMERO_TMPDIR", - "PATH", - "PYTHONPATH", - ) + variables = self.ctx.get("omero.process.env_vars", None) + if variables is None: + variables = ( + # For backwards compatibility + "CLASSPATH", + "DISPLAY", + "DYLD_LIBRARY_PATH", + "HOME", + "JYTHON_HOME", + "LC_ALL", + "LANG", + "LANGUAGE", + "LD_LIBRARY_PATH", + "MLABRAW_CMD_STR", + "OMERODIR", + "OMERO_TEMPDIR", + "OMERO_TMPDIR", + "PATH", + "PYTHONPATH", + # issue:395 + "http_proxy", + "HTTP_PROXY", + "https_proxy", + "HTTPS_PROXY", + "no_proxy", + "NO_PROXY", + ) + else: + variables = variables.split(",") + + self.env = omero.util.Environment(*variables) # Since we know the location of our OMERO, we're going to # force the value for OMERO_HOME. This is useful in scripts