diff options
| author | Antonin Bourguignon <abo@openerp.com> | 2012-10-02 14:06:34 +0200 |
|---|---|---|
| committer | Antonin Bourguignon <abo@openerp.com> | 2012-10-02 14:06:34 +0200 |
| commit | c28dfb19e19ea9dde6de2ae5fb20cfec3860744e (patch) | |
| tree | 4fdff0732f33426af59c7792b8e727458afe913c /addons/document/content_index.py | |
| parent | 79b2a0f6c6017d984b15160b8be806ecf7131b3e (diff) | |
| parent | 2b2288a3bd29c096cc5eb70c4d966cfd32bffc45 (diff) | |
[MERGE] trunk-unmutable-defaults-abo: fix the last few methods that still have mutable defaults
also improve code style (methods signatures and whitespaces)
contribution of Lionel Sausin from Numerigraphe
bzr revid: abo@openerp.com-20121002120634-ms2ins653tktqfnt
Diffstat (limited to 'addons/document/content_index.py')
| -rw-r--r-- | addons/document/content_index.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/addons/document/content_index.py b/addons/document/content_index.py index 4cf3c8dfed2..399541e1f59 100644 --- a/addons/document/content_index.py +++ b/addons/document/content_index.py @@ -51,7 +51,7 @@ class indexer(object): 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 @@ -95,16 +95,15 @@ class indexer(object): raise NhException('No appropriate method to index file.') - def _doIndexContent(self,content): + def _doIndexContent(self, content): raise NhException("Content cannot be handled here.") - def _doIndexFile(self,fpath): + def _doIndexFile(self, fpath): raise NhException("Content cannot be handled here.") def __repr__(self): return "<indexer %s.%s>" %(self.__module__, self.__class__.__name__) - def mime_match(mime, mdict): if mdict.has_key(mime): return (mime, mdict[mime]) @@ -136,7 +135,7 @@ class contentIndex(object): if not f: raise Exception("Your indexer should at least support 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 |
