1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

samba-tool gpo: use common attr_default

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
Douglas Bagnall 2020-11-19 11:24:47 +13:00 committed by Noel Power
parent 816dee1a13
commit e253c45c6d

View File

@ -63,13 +63,7 @@ from samba.gp_parse.gp_inf import GptTmplInfParser
from samba.gp_parse.gp_aas import GPAasParser
from samba import param
from samba.credentials import SMB_SIGNING_REQUIRED
def attr_default(msg, attrname, default):
'''get an attribute from a ldap msg with a default'''
if attrname in msg:
return msg[attrname][0]
return default
from samba.netcmd.common import attr_default
def gpo_flags_string(value):