From 78dac942171a545fcd2f6247b0b45ec3abe8d13f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 Mar 2024 14:14:31 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=20=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=D0=BA=D0=BE=D0=B2=D1=8B=D1=85=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D0=B5=D0=B9=20=D0=B2=20=D1=88=D0=B0=D0=BF?= =?UTF-8?q?=D0=BA=D0=B5=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/calculate/lib/cl_template.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pym/calculate/lib/cl_template.py b/pym/calculate/lib/cl_template.py index 1d009b4..1948374 100644 --- a/pym/calculate/lib/cl_template.py +++ b/pym/calculate/lib/cl_template.py @@ -4251,7 +4251,7 @@ gettext -d cl_template "$*" continue else: line = line.replace("#", '').strip() - if os.path.exists(line): + if os.path.exists(line) and line not in commentsList: commentsList.append(line) return commentsList @@ -6243,6 +6243,8 @@ gettext -d cl_template "$*" # Титл конфигурационного файла title = "" if ListOptTitle: + # prevComments = self.getPrevComments(nameFileConfig, self.__titleHead) + # ListOptTitle = prevComments + [x for x in ListOptTitle if x not in prevComments] title = self.getTitle(objHeadNew.comment, ListOptTitle, configPath=nameFileConfig) @@ -6543,7 +6545,11 @@ gettext -d cl_template "$*" # Титл для объединения if ListOptTitle: prevComments = self.getPrevComments(nameFileConfig, self.__titleHead) - ListOptTitle = prevComments + [x for x in ListOptTitle if x not in prevComments] + newListOptTitle = [] + for x in ListOptTitle: + if x not in prevComments and x not in newListOptTitle: + newListOptTitle.append(x) + ListOptTitle = newListOptTitle title = self.getTitle(objTemplNew._comment, ListOptTitle, configPath=nameFileConfig)