summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/gpo.py6
1 files changed, 3 insertions, 3 deletions
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)