|
|
|
@ -2960,6 +2960,10 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
|
|
|
|
reg = re.compile(regpattern)
|
|
|
|
|
except re.error as e:
|
|
|
|
|
self.raiseErrTemplate(_("Wrong regular expression"))
|
|
|
|
|
if fname[0] == "~":
|
|
|
|
|
# Получаем директорию пользователя
|
|
|
|
|
fname = os.path.join(self.homeDir,
|
|
|
|
|
fname.partition("/")[2],"")[:-1]
|
|
|
|
|
fname = pathJoin(self.objVar.Get('cl_chroot_path'),fname)
|
|
|
|
|
fileContent = readFile(fname)
|
|
|
|
|
match_data = reg.search(fileContent)
|
|
|
|
|