1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-01-09 21:17:52 +03:00

Refactor object initialization in init

This commit is contained in:
Valery Sinelnikov 2023-09-26 11:15:54 +04:00
parent 82bb88ca34
commit bcb9108424

View File

@ -71,7 +71,10 @@ class Dconf_registry():
def __init__(self, username, is_machine):
self.username = username
self.is_machine = is_machine
self.uid = get_uid_by_username(username) if not is_machine else None
if self.is_machine:
self.uid = None
else:
self.uid = get_uid_by_username(username) if not is_machine else None
target_file = get_dconf_config_path(self.uid)
touch_file(target_file)
self.apply_template()