From 963f0df179720240a8a6072dd7960aefd654ff5a Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 3 Jul 2012 11:22:55 +1000 Subject: samba-tool: gpo: Correct the attribute name from gPlink to gPLink Thanks to Denis Bonnenfant for patch. --- source4/scripting/python/samba/netcmd/gpo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/netcmd/gpo.py b/source4/scripting/python/samba/netcmd/gpo.py index 8482e73fbd..318cc30419 100644 --- a/source4/scripting/python/samba/netcmd/gpo.py +++ b/source4/scripting/python/samba/netcmd/gpo.py @@ -458,11 +458,11 @@ class cmd_getlink(Command): try: msg = self.samdb.search(base=container_dn, scope=ldb.SCOPE_BASE, expression="(objectClass=*)", - attrs=['gPlink'])[0] + attrs=['gPLink'])[0] except Exception, e: raise CommandError("Could not find Container DN %s (%s)" % container_dn, e) - if 'gPLink' in msg: + if msg['gPLink']: self.outf.write("GPO(s) linked to DN %s\n" % container_dn) gplist = parse_gplink(msg['gPLink'][0]) for g in gplist: @@ -523,7 +523,7 @@ class cmd_setlink(Command): try: msg = self.samdb.search(base=container_dn, scope=ldb.SCOPE_BASE, expression="(objectClass=*)", - attrs=['gPlink'])[0] + attrs=['gPLink'])[0] except Exception, e: raise CommandError("Could not find container DN %s" % container_dn, e) -- cgit