1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-01-25 02:04:18 +03:00

Added avoidance of error output in other de

This commit is contained in:
Valery Sinelnikov 2023-09-18 12:00:17 +04:00
parent 7e666043be
commit 7a0571278f
3 changed files with 18 additions and 3 deletions

View File

@ -171,9 +171,12 @@ def apply(all_kde_settings, locks_dict, username = None):
try:
subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except Exception as exc:
clear_locks_settings(username, file_name, key)
try:
clear_locks_settings(username, file_name, key)
subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError as exc:
logdata['exc'] = exc
log('W18', exc)
except Exception as exc:
logdata = dict()
logdata['command'] = command
@ -237,5 +240,9 @@ def apply_for_widget(value, data, file_cache):
log('E66')
else:
pass
except OSError as e:
log('E67')
except OSError as exc:
logdata['exc'] = exc
log('W17', logdata)
except Exception as exc:
logdata['exc'] = exc
log('E67', logdata)

View File

@ -889,6 +889,12 @@ msgstr "Не удалось скопировать файл"
msgid "Failed to create settings list"
msgstr "Не удалось создать список настроек"
msgid "Could not find application tools"
msgstr "Не удалось найти инструменты применения"
msgid "Failed to open settings"
msgstr "Не удалось открыть настройки"
# Fatal
msgid "Unable to refresh GPO list"
msgstr "Невозможно обновить список объектов групповых политик"

View File

@ -336,6 +336,8 @@ def warning_code(code):
warning_ids[14] = 'Could not create a valid list of keys'
warning_ids[15] = 'Failed to copy file'
warning_ids[16] = 'Failed to create settings list'
warning_ids[17] = 'Could not find application tools'
warning_ids[18] = 'Failed to open settings'
return warning_ids.get(code, 'Unknown warning code')