mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-20 18:50:17 +03:00
Added check for /etc/local-policy path for gpupdate
This commit is contained in:
parent
2571e27235
commit
4e8888086f
@ -17,13 +17,22 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pathlib
|
||||
import os
|
||||
|
||||
|
||||
def default_policy_path():
|
||||
'''
|
||||
Returns path pointing to Default Policy directory.
|
||||
'''
|
||||
return pathlib.Path('/usr/share/local-policy/default')
|
||||
local_policy_default = '/usr/share/local-policy/default'
|
||||
etc_local_policy_default = '/etc/local-policy/active'
|
||||
|
||||
result_path = pathlib.Path(local_policy_default)
|
||||
|
||||
if os.path.exists(etc_local_policy_default):
|
||||
result_path = pathlib.Path(etc_local_policy_default)
|
||||
|
||||
return pathlib.Path(result_path)
|
||||
|
||||
|
||||
def cache_dir():
|
||||
|
Loading…
x
Reference in New Issue
Block a user