def process_IN_CREATE(self, event): path = event.pathname self.logger.debug('File path: ' + path) if not os.path.isfile(path): return if FileUtils.isFilePart(path): return index = path.rfind('/') self.connector.setNxPath(self.mapper[path[:index]]) try: path = self.ocr.doOcr(path) except Exception, e: self.logger.error('OCR subprocess failed: ' + str(e))
def process_IN_CREATE(self, event): path = event.pathname self.logger.debug("File path: " + path) if not os.path.isfile(path): return if FileUtils.isFilePart(path): return index = path.rfind("/") self.connector.setNxPath(self.mapper[path[:index]]) try: path = self.ocr.doOcr(path) except Exception, e: self.logger.error("OCR subprocess failed: " + str(e))