Show More
@@ -86,13 +86,24 b' class WhooshIndexingDaemon(object):' | |||||
86 | log.debug(' >> %s' % path) |
|
86 | log.debug(' >> %s' % path) | |
87 | #just index file name without it's content |
|
87 | #just index file name without it's content | |
88 | u_content = u'' |
|
88 | u_content = u'' | |
89 |
|
|
89 | ||
90 | writer.add_document(owner=unicode(repo.contact), |
|
90 | ||
|
91 | ||||
|
92 | try: | |||
|
93 | os.stat(path) | |||
|
94 | writer.add_document(owner=unicode(repo.contact), | |||
91 | repository=u"%s" % repo.name, |
|
95 | repository=u"%s" % repo.name, | |
92 | path=u"%s" % path, |
|
96 | path=u"%s" % path, | |
93 | content=u_content, |
|
97 | content=u_content, | |
94 | modtime=os.path.getmtime(path), |
|
98 | modtime=os.path.getmtime(path), | |
95 | extension=ext) |
|
99 | extension=ext) | |
|
100 | except OSError, e: | |||
|
101 | import errno | |||
|
102 | if e.errno == errno.ENOENT: | |||
|
103 | log.debug('path %s does not exist or is a broken symlink' % path) | |||
|
104 | else: | |||
|
105 | raise e | |||
|
106 | ||||
96 |
|
107 | |||
97 | def build_index(self): |
|
108 | def build_index(self): | |
98 | if os.path.exists(IDX_LOCATION): |
|
109 | if os.path.exists(IDX_LOCATION): |
General Comments 0
You need to be logged in to leave comments.
Login now