mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-23 18:50:29 +03:00
Frontend manager: Running machine appliers made a little bit more flexible
At the start of the project the demands were pretty simple and the functionality required was rather restricted. Now we have some architecture and demands are growing accordingly so this commit eliminated hardcode in favor of iteration over flexible lists.
This commit is contained in:
parent
2b86ab87eb
commit
cb38da0e09
@ -80,15 +80,15 @@ class frontend_manager:
|
||||
self.sid = get_sid(self.storage.get_info('domain'), self.username, is_machine)
|
||||
|
||||
self.machine_appliers = dict({
|
||||
'control': control_applier(self.storage),
|
||||
'polkit': polkit_applier(self.storage),
|
||||
'systemd': systemd_applier(self.storage),
|
||||
'firefox': firefox_applier(self.storage, self.sid, self.username),
|
||||
'chromium': chromium_applier(self.storage, self.sid, self.username),
|
||||
'shortcuts': shortcut_applier(self.storage),
|
||||
'gsettings': gsettings_applier(self.storage),
|
||||
'cups': cups_applier(self.storage),
|
||||
'package': package_applier(self.storage)
|
||||
'control': control_applier(self.storage)
|
||||
, 'polkit': polkit_applier(self.storage)
|
||||
, 'systemd': systemd_applier(self.storage)
|
||||
, 'firefox': firefox_applier(self.storage, self.sid, self.username)
|
||||
, 'chromium': chromium_applier(self.storage, self.sid, self.username)
|
||||
, 'shortcuts': shortcut_applier(self.storage)
|
||||
, 'gsettings': gsettings_applier(self.storage)
|
||||
, 'cups': cups_applier(self.storage)
|
||||
#, 'package': package_applier(self.storage)
|
||||
})
|
||||
|
||||
# User appliers are expected to work with user-writable
|
||||
@ -107,15 +107,9 @@ class frontend_manager:
|
||||
logging.error('Not sufficient privileges to run machine appliers')
|
||||
return
|
||||
logging.debug(slogm('Applying computer part of settings'))
|
||||
self.machine_appliers['systemd'].apply()
|
||||
self.machine_appliers['control'].apply()
|
||||
self.machine_appliers['polkit'].apply()
|
||||
self.machine_appliers['firefox'].apply()
|
||||
self.machine_appliers['chromium'].apply()
|
||||
self.machine_appliers['shortcuts'].apply()
|
||||
self.machine_appliers['gsettings'].apply()
|
||||
self.machine_appliers['cups'].apply()
|
||||
#self.machine_appliers['package'].apply()
|
||||
for applier_name, applier_object in self.machine_appliers.items():
|
||||
logging.debug('Running machine applier {}'.format(applier_name))
|
||||
applier_object.apply()
|
||||
|
||||
def user_apply(self):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user