From d35dd5433da2f5758598367c9900109c4f784fb8 Mon Sep 17 00:00:00 2001 From: Valery Sinelnikov Date: Mon, 10 Oct 2022 17:57:20 +0400 Subject: [PATCH] Added new logs for using yandex_applier --- gpoa/frontend/yandex_applier.py | 10 +++++----- gpoa/locale/ru_RU/LC_MESSAGES/gpoa.po | 9 +++++++++ gpoa/messages/__init__.py | 3 +++ tools/parsing_chrom_admx_intvalues.py | 0 4 files changed, 17 insertions(+), 5 deletions(-) mode change 100644 => 100755 tools/parsing_chrom_admx_intvalues.py diff --git a/gpoa/frontend/yandex_applier.py b/gpoa/frontend/yandex_applier.py index fc5df93..06072a1 100644 --- a/gpoa/frontend/yandex_applier.py +++ b/gpoa/frontend/yandex_applier.py @@ -72,7 +72,7 @@ class yandex_applier(applier_frontend): json.dump(dict_item_to_list(self.policies_json), f) logdata = dict() logdata['destfile'] = destfile - log('D97', logdata) + log('D185', logdata) destfilerec = os.path.join(self.__recommended_policies_path, 'policies.json') os.makedirs(self.__recommended_policies_path, exist_ok=True) @@ -80,7 +80,7 @@ class yandex_applier(applier_frontend): json.dump(dict_item_to_list(recommended__json), f) logdata = dict() logdata['destfilerec'] = destfilerec - log('D97', logdata) + log('D185', logdata) def apply(self): @@ -88,11 +88,11 @@ class yandex_applier(applier_frontend): All actual job done here. ''' if self.__module_enabled: - print("log('D95'") + log('D183') self.create_dict(self.yandex_keys) self.machine_apply() else: - print("log('D96'") + log('D184') def get_valuename_typeint(self): ''' @@ -162,7 +162,7 @@ class yandex_applier(applier_frontend): logdata = dict() logdata['Exception'] = exc logdata['keyname'] = it_data.keyname - print("log('????'", logdata) + log('D178', logdata) try: self.policies_json = counts[''] except: diff --git a/gpoa/locale/ru_RU/LC_MESSAGES/gpoa.po b/gpoa/locale/ru_RU/LC_MESSAGES/gpoa.po index 5c76d4a..f547566 100644 --- a/gpoa/locale/ru_RU/LC_MESSAGES/gpoa.po +++ b/gpoa/locale/ru_RU/LC_MESSAGES/gpoa.po @@ -753,6 +753,15 @@ msgstr "Применение настроек сетевых каталогов msgid "Apply network share data action failed" msgstr "Не удалось применить действие с данными общего сетевого ресурса" +msgid "Running yandex_applier for machine" +msgstr "Запуск yandex_applier для машины" + +msgid "Yandex_applier for machine will not be started" +msgstr "Yandex_applier для машины не запустится" + +msgid "Wrote YandexBrowser preferences to" +msgstr "Запись настройки Яндекс Браузера в" + # Debug_end # Warning diff --git a/gpoa/messages/__init__.py b/gpoa/messages/__init__.py index 3520904..ff5a77b 100644 --- a/gpoa/messages/__init__.py +++ b/gpoa/messages/__init__.py @@ -287,6 +287,9 @@ def debug_code(code): debug_ids[180] = 'Running networkshare applier for machine' debug_ids[181] = 'Running networkshare applier for machine will not be started' debug_ids[182] = 'Apply network share data action failed' + debug_ids[183] = 'Running yandex_applier for machine' + debug_ids[184] = 'Yandex_applier for machine will not be started' + debug_ids[185] = 'Wrote YandexBrowser preferences to' return debug_ids.get(code, 'Unknown debug code') diff --git a/tools/parsing_chrom_admx_intvalues.py b/tools/parsing_chrom_admx_intvalues.py old mode 100644 new mode 100755