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

Removed unnecessary calls to subprocess

This commit is contained in:
Valery Sinelnikov 2024-02-05 17:47:23 +04:00
parent 1b150e21c7
commit 729f916646

View File

@ -106,20 +106,7 @@ def get_backends():
'''
Get the list of backends supported by GPOA
'''
command = ['/usr/sbin/gpoa', '--list-backends']
backends = list()
out = list()
with subprocess.Popen(command, stdout=subprocess.PIPE) as proc:
out = proc.stdout.read().decode('utf-8')
proc.wait()
out = out.split('\n')
for line in out:
tmpline = line.replace('\n', '')
if tmpline != '':
backends.append(tmpline)
return backends
return ['local', 'samba']
def get_default_policy_name():
'''