@override
    def process_output(self, line):
        self.analyze_db_log.write('%s\n' % line)
        self.analyze_db_log.flush()

        timestamp, level, message = self.preprocess_output_digits(line)
        if not message:
            return False

        # progress
        match = re.match(r'Progress: (\d+)\/(\d+)', message)
        if match:
            self.progress = float(match.group(1))/float(match.group(2))
            self.emit_progress_update()
            return True

        # total count
        match = re.match(r'Total entries: (\d+)', message)
        if match:
            self.image_count = int(match.group(1))
            return True

        # image dimensions
        match = re.match(r'(\d+) entries found with shape ((\d+)x(\d+)x(\d+))', message)
        if match:
            count = int(match.group(1))
            dims = match.group(2)
            self.image_width = int(match.group(3))
            self.image_height = int(match.group(4))
            self.image_channels = int(match.group(5))
            self.logger.debug(dims % 'Images are %s')
            return True

        if level == 'warning':
            self.logger.warning('%s: %s' % (self.name(), message))
            return True
        if level in ['error', 'critical']:
            self.logger.error('%s: %s' % (self.name(), message))
            self.exception = message
            return True

        return True
dataset/ETHPy150Open NVIDIA/DIGITS/digits/dataset/tasks/analyze_db.py/AnalyzeDbTask.process_output/swapped operands of `%`