mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added logs for the get_matching_keys method
This commit is contained in:
parent
51c8711da6
commit
a225c9aa7f
@ -240,6 +240,9 @@ msgstr "Ошибка создания переменных среды"
|
||||
msgid "Error running kwriteconfig5 command"
|
||||
msgstr "Ошибка выполнения команды kwriteconfig5"
|
||||
|
||||
msgid "Error getting list of keys"
|
||||
msgstr "Ошибка получения списка ключей"
|
||||
|
||||
# Error_end
|
||||
|
||||
# Debug
|
||||
@ -837,6 +840,9 @@ msgstr "Изменение конфигурационного файла"
|
||||
msgid "Widget command completed successfully"
|
||||
msgstr "Команда для виджетов выполнена успешно"
|
||||
|
||||
msgid "Getting a list of keys"
|
||||
msgstr "Получение списка ключей"
|
||||
|
||||
# Debug_end
|
||||
|
||||
# Warning
|
||||
|
@ -103,6 +103,7 @@ def error_code(code):
|
||||
error_ids[66] = 'Error while executing command for widgets'
|
||||
error_ids[67] = 'Error creating environment variables'
|
||||
error_ids[68] = 'Error running kwriteconfig5 command'
|
||||
error_ids[69] = 'Error getting list of keys'
|
||||
return error_ids.get(code, 'Unknown error code')
|
||||
|
||||
def debug_code(code):
|
||||
@ -310,6 +311,7 @@ def debug_code(code):
|
||||
debug_ids[201] = 'KDE applier for user in user context will not be started'
|
||||
debug_ids[202] = 'Changing the configuration file'
|
||||
debug_ids[203] = 'Widget command completed successfully'
|
||||
debug_ids[204] = 'Getting a list of keys'
|
||||
return debug_ids.get(code, 'Unknown debug code')
|
||||
|
||||
def warning_code(code):
|
||||
|
@ -92,10 +92,12 @@ class Dconf_registry():
|
||||
def get_matching_keys(path):
|
||||
if path[0] != '/':
|
||||
path = '/' + path
|
||||
|
||||
logdata = dict()
|
||||
try:
|
||||
process = subprocess.Popen(['dconf', 'list', path],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
||||
logdata['path'] = path
|
||||
log('D204', logdata)
|
||||
output, error = process.communicate()
|
||||
if not output and not error:
|
||||
return
|
||||
@ -107,7 +109,8 @@ class Dconf_registry():
|
||||
Dconf_registry.list_keys.append(path)
|
||||
return Dconf_registry.list_keys
|
||||
except Exception as exc:
|
||||
#log
|
||||
logdata['exc'] = exc
|
||||
log('E69', logdata)
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user