Commit 932d06be authored by Gabriel Monnerat's avatar Gabriel Monnerat

revert part of r38626 and remove attributes not used

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@38628 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e45e2121
......@@ -31,6 +31,7 @@ from os import environ
from os.path import exists, join
from subprocess import Popen, PIPE
from threading import Lock
from sys import executable as python_path
from zope.interface import implements
from application import Application
from xvfb import xvfb
......@@ -57,7 +58,7 @@ class OpenOffice(Application):
def _testOpenOffice(self, host, port):
"""Test if OpenOffice was started correctly"""
logger.debug("Test OpenOffice %s - Pid %s" % (self.getAddress()[-1], self.pid()))
command = ["python"
command = [python_path
, pkg_resources.resource_filename("cloudooo",
join("helper", "openoffice_tester.py"))
, "'--hostname=%s'" % host
......
......@@ -69,7 +69,7 @@ class OOHandler:
hostname, port = openoffice.getAddress()
kw['hostname'] = hostname
kw['port'] = port
command_list = ["python"
command_list = [python_path
, pkg_resources.resource_filename("cloudooo",
path.join("helper", "unoconverter.py"))
, "--uno_path='%s'" % self.uno_path
......@@ -179,7 +179,6 @@ class OOHandler:
base_document -- Boolean variable. if true, the document is also returned
along with the metadata."""
openoffice.acquire()
mimemapper_pickled = jsonpickle.encode(mimemapper)
logger.debug("getMetadata")
kw = dict(mimemapper=self._serializeMimemapper())
if base_document:
......
......@@ -17,7 +17,7 @@ def main():
opt_list, arg_list = getopt(sys.argv[1:], "",
["port=","hostname=","uno_path="])
except GetoptError, e:
usage(sys.stderr, "%s \nUse --port and --hostname" % e)
print >> sys.stderr, "%s \nUse --port and --hostname" % e
sys.exit(2)
for opt, arg in opt_list:
......
......@@ -34,6 +34,7 @@ from filter import Filter
from os import environ, path
from interfaces.mimemapper import IMimemapper
from types import InstanceType
from sys import executable as python_path
class MimeMapper(object):
"""Load all filters from OOo. You can get the of the filter you want or all
......@@ -106,7 +107,7 @@ class MimeMapper(object):
uno_path = kw.get("uno_path", environ.get('uno_path'))
office_binary_path = kw.get("office_binary_path",
environ.get('office_binary_path'))
command = ["python"
command = [python_path
, pkg_resources.resource_filename(__name__,
path.join("helper","unomimemapper.py"))
, "'--uno_path=%s'" % uno_path
......
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