BuildScript/scripts/parser/BackupParser/RestoreBackupParser.py

22 lines
442 B
Python

import re
from parser.LineParser import LineParser
class RestoreBackupParser(LineParser):
def parseLine(self, line):
assert line is not None
regexpSource = r'restore from backup\s*'
regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line)
self._guardMatch(match, line, regexpSource)
def isValidLine(self, line):
assert line is not None
isValid = line.startswith('restore from backup')
return isValid