Commit dd3c275a authored by Gabriel Monnerat's avatar Gabriel Monnerat

fix import and put OOHandler to extend object

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@43713 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 900a8f9b
......@@ -43,7 +43,7 @@ from cloudooo.utils.utils import logger
from psutil import pid_exists
class OOHandler:
class OOHandler(object):
"""OOHandler is used to access the one Document and OpenOffice.
For each Document inputed is created on instance of this class to manipulate
the document. This Document must be able to create and remove a temporary
......
......@@ -41,7 +41,7 @@ from cloudooo.interfaces.granulate import IImageGranulator
from cloudooo.interfaces.granulate import ITextGranulator
from fnmatch import fnmatch
from cloudooo.interfaces.handler import IHandler
from types import ClassType
from types import TypeType
def getHandlerObject(source_format, destination_format, mimetype_registry):
......@@ -60,7 +60,7 @@ def getHandlerObject(source_format, destination_format, mimetype_registry):
if not name.endswith("Handler"):
continue
obj = getattr(handler, name)
if type(obj) == ClassType and IHandler.implementedBy(obj):
if type(obj) == TypeType and IHandler.implementedBy(obj):
return obj
raise ValueError("No Handler Enabled for this conversion")
......
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