diff options
-rwxr-xr-x | source4/scripting/bin/samba_spnupdate | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate index 502eebaf53..c6af81f4fd 100755 --- a/source4/scripting/bin/samba_spnupdate +++ b/source4/scripting/bin/samba_spnupdate @@ -138,8 +138,9 @@ if not res or len(res) != 1: machine_dn = res[0]["dn"] old_spns = [] -for s in res[0]['servicePrincipalName']: - old_spns.append(s) +if "servicePrincipalName" in res[0]: + for s in res[0]["servicePrincipalName"]: + old_spns.append(s) if opts.verbose: print("Existing SPNs: %s" % old_spns) |