Changeset - 29ec9ddbe258
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-10-07 18:30:50
marcin@python-works.com
fixed whoosh indexing possible unicode decode errors
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/indexers/daemon.py
Show inline comments
 
@@ -97,26 +97,26 @@ class WhooshIndexingDaemon(object):
 
            fobj.close()
 
            u_content = safe_unicode(content)
 
        else:
 
            log.debug('    >> %s' % path)
 
            #just index file name without it's content
 
            u_content = u''
 
        
 
        
 
        
 
        try:
 
            os.stat(path)
 
            writer.add_document(owner=unicode(repo.contact),
 
                            repository=u"%s" % repo.name,
 
                            path=u"%s" % path,
 
                            repository=safe_unicode(repo.name),
 
                            path=safe_unicode(path),
 
                            content=u_content,
 
                            modtime=os.path.getmtime(path),
 
                            extension=ext)             
 
        except OSError, e:
 
            import errno
 
            if e.errno == errno.ENOENT:
 
                log.debug('path %s does not exist or is a broken symlink' % path)
 
            else:
 
                raise e                 
 

	
 
    
 
    def build_index(self):
0 comments (0 inline, 0 general)