summaryrefslogtreecommitdiff
path: root/addons/document/content_index.py
diff options
context:
space:
mode:
authoratp (Open ERP) <atp@tinyerp.co.in>2010-06-22 10:45:44 +0530
committeratp (Open ERP) <atp@tinyerp.co.in>2010-06-22 10:45:44 +0530
commitb0efd26edd9f4e2aa75424b787ea46d2be15cd04 (patch)
treee78cdb693e62a5c9a17f77a395eec51fb34becbf /addons/document/content_index.py
parent46bb1ea51be702758d68a5f69db32c82dbccf9bd (diff)
parent2319190c5a20cb8095f85cacca89a33164ba93d7 (diff)
[MERGE]: merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: atp@tinyerp.co.in-20100622051544-c7hig73zk2at66cy
Diffstat (limited to 'addons/document/content_index.py')
-rw-r--r--addons/document/content_index.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/document/content_index.py b/addons/document/content_index.py
index a13ba35b60a..e7f88834647 100644
--- a/addons/document/content_index.py
+++ b/addons/document/content_index.py
@@ -27,7 +27,7 @@ class NhException(Exception):
from subprocess import Popen, PIPE
-class indexer():
+class indexer(object):
""" An indexer knows how to parse the content of some file.
Typically, one indexer should be instantiated per file
@@ -43,7 +43,7 @@ class indexer():
def _getExtensions(self):
return []
- def _getDefMime(self,ext):
+ def _getDefMime(self, ext):
""" Return a mimetype for this document type, ideally the
closest to the extension ext. """
mts = self._getMimeTypes();
@@ -51,7 +51,7 @@ class indexer():
return mts[0]
return None
- def indexContent(self,content,filename=None, realfile = None):
+ def indexContent(self, content, filename=None, realfile = None):
""" Use either content or the real file, to index.
Some parsers will work better with the actual
content, others parse a file easier. Try the
@@ -111,7 +111,7 @@ def mime_match(mime, mdict):
return (None, None)
-class contentIndex():
+class contentIndex(object):
__logger = logging.getLogger('addons.document.content_index')
def __init__(self):
self.mimes = {}
@@ -132,7 +132,7 @@ class contentIndex():
if not f:
raise Exception("Your indexer should at least suport a mimetype or extension")
- def doIndex(self,content, filename=None, content_type=None, realfname = None, debug=False):
+ def doIndex(self, content, filename=None, content_type=None, realfname = None, debug=False):
fobj = None
fname = None
mime = None