18 lines
473 B
Python
18 lines
473 B
Python
import re
|
|
|
|
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
|
|
|
|
|
|
class DeleteBackupParser(ParserBackupBase):
|
|
def __init__(self):
|
|
ParserBackupBase.__init__(self)
|
|
|
|
def getMatchInfo(self, line):
|
|
assert line is not None
|
|
|
|
folderNameRegexp = r"'(?P<folder>[^']+)'$"
|
|
regexpSource = self.startsWith('delete') + self.than('backup') + folderNameRegexp
|
|
regexp = re.compile(regexpSource, re.UNICODE)
|
|
|
|
match = regexp.match(line)
|
|
return match, regexpSource |