mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
gpo: Don't duplicate guids in the apply log
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
de8b30a726
commit
b05b6198a3
@ -139,9 +139,11 @@ class gp_log:
|
||||
apply_log = user_obj.find('applylog')
|
||||
if apply_log is None:
|
||||
apply_log = etree.SubElement(user_obj, 'applylog')
|
||||
item = etree.SubElement(apply_log, 'guid')
|
||||
item.attrib['count'] = '%d' % (len(apply_log)-1)
|
||||
item.attrib['value'] = guid
|
||||
prev = apply_log.find('guid[@value="%s"]' % guid)
|
||||
if prev is None:
|
||||
item = etree.SubElement(apply_log, 'guid')
|
||||
item.attrib['count'] = '%d' % (len(apply_log)-1)
|
||||
item.attrib['value'] = guid
|
||||
|
||||
def apply_log_pop(self):
|
||||
''' Pop a GPO guid from the applylog
|
||||
|
Loading…
Reference in New Issue
Block a user