1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Automatically detect local policy name

This commit is contained in:
Игорь Чудов 2020-09-11 14:26:25 +04:00
parent 6cf0a7b136
commit 536d989497
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -20,13 +20,14 @@ import pathlib
import os
from .config import GPConfig
from .util import get_default_policy_name
def default_policy_path():
'''
Returns path pointing to Default Policy directory.
'''
local_policy_default = '/usr/share/local-policy/default'
local_policy_default = '/usr/share/local-policy/{}'.format(get_default_policy_name())
config = GPConfig()
result_path = pathlib.Path(local_policy_default)