summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-03-28 17:49:09 +1100
committerAmitay Isaacs <amitay@samba.org>2012-03-28 10:27:40 +0200
commite36622f92616b6982bf875563728dc8cdf97c93c (patch)
tree8f8b0c6ef4f83263437b695306b45e0ef07412ea /source4/scripting/bin
parent3be2af1df94443a2dc21d4f5f58ce11b83e4306f (diff)
downloadsamba-e36622f92616b6982bf875563728dc8cdf97c93c.tar.gz
samba-e36622f92616b6982bf875563728dc8cdf97c93c.tar.bz2
samba-e36622f92616b6982bf875563728dc8cdf97c93c.zip
s4-upgradedns: Make sure the attribute exists before accessing it
Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Mar 28 10:27:40 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_upgradedns12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns
index 1a42e0c8ce..86172a762d 100755
--- a/source4/scripting/bin/samba_upgradedns
+++ b/source4/scripting/bin/samba_upgradedns
@@ -379,12 +379,16 @@ if __name__ == '__main__':
msg = msgs[0]
master_nclist = []
- for nc in msg["msDS-hasMasterNCs"]:
- master_nclist.append(nc)
+ ncs = msg.get("msDS-hasMasterNCs")
+ if ncs:
+ for nc in ncs:
+ master_nclist.append(nc)
partial_nclist = []
- for nc in msg["hasPartialReplicaNCs"]:
- partial_nclist.append(nc)
+ ncs = msg.get("hasPartialReplicaNCs")
+ if ncs:
+ for nc in ncs:
+ partial_nclist.append(nc)
modified = False
for nc in dns_nclist: