Commit 56ac38ad authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

existing environment variables should not affect cloudooo. if some enviroment...

existing environment variables should not affect cloudooo. if some enviroment variables should be set, we should improve cloudooo so that it can accepts such parameters in its configuration file.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42080 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29d544c6
......@@ -40,7 +40,6 @@ from cloudooo.utils.utils import logger, convertStringToBool
from cloudooo.handler.ooo.utils.utils import waitStartDaemon, \
removeDirectory, waitStopDaemon, \
socketStatus
from cloudooo.utils.utils import getCleanPythonEnvironment
class OpenOffice(Application):
"""Object to control one OOo Instance and all features instance."""
......@@ -145,7 +144,7 @@ class OpenOffice(Application):
]
# To run the instance OOo is need a environment. So, the "DISPLAY" of Xvfb
# is passed to env and the environment customized is passed to the process
env = getCleanPythonEnvironment()
env = {}
env["HOME"] = self.path_user_installation
env["TMP"] = self.path_user_installation
env["TMPDIR"] = self.path_user_installation
......
......@@ -34,7 +34,6 @@ from filter import Filter
from os import environ, path
from cloudooo.interfaces.mimemapper import IMimemapper
from types import InstanceType
from cloudooo.utils.utils import getCleanPythonEnvironment
import json
......@@ -120,8 +119,7 @@ class MimeMapper(object):
stdout, stderr = Popen(command,
stdout=PIPE,
close_fds=True,
env=getCleanPythonEnvironment()).communicate()
close_fds=True).communicate()
filter_dict, type_dict = json.loads(stdout)
for filter_name, value in filter_dict.iteritems():
flag = value.get("Flags")
......
......@@ -51,14 +51,6 @@ PYTHON_ENVIRONMENT = [
]
def getCleanPythonEnvironment():
env = environ.copy()
# Clean python related environment variables
for k in PYTHON_ENVIRONMENT:
env.pop(k, None)
return env
def removeDirectory(path):
"""Remove directory"""
try:
......
......@@ -47,14 +47,6 @@ PYTHON_ENVIRONMENT = [
]
def getCleanPythonEnvironment():
env = environ.copy()
# Clean python related environment variables
for k in PYTHON_ENVIRONMENT:
env.pop(k, None)
return env
def configureLogger(level=None, debug_mode=False):
"""Configure logger.
Keyword arguments:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment