summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-09-05 03:00:05 +0400
committerMatthieu Patou <mat@matws.net>2010-09-05 12:29:21 +0400
commit49321571ea592be2307eef101cc783f883aa2503 (patch)
tree040f79a3565a7cd1f9b8a73092246ebb34bb76a4 /source4
parentb1535582100a551cedc245f12cf63a1340985bdd (diff)
downloadsamba-49321571ea592be2307eef101cc783f883aa2503.tar.gz
samba-49321571ea592be2307eef101cc783f883aa2503.tar.bz2
samba-49321571ea592be2307eef101cc783f883aa2503.zip
upgradeprovision: avoid working with None objects ...
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/bin/upgradeprovision19
1 files changed, 10 insertions, 9 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 39b5042da4..6697c821f9 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -1657,15 +1657,16 @@ if __name__ == '__main__':
doit = False
if deltaattr is not None and len(deltaattr) > 1:
doit = True
- deltaattr.remove("dn")
- for att in deltaattr:
- if att.lower() == "dn":
- continue
- if deltaattr.get(att) is not None \
- and deltaattr.get(att).flags() != FLAG_MOD_ADD:
- doit = False
- elif deltaattr.get(att) is None:
- doit = False
+ if doit:
+ deltaattr.remove("dn")
+ for att in deltaattr:
+ if att.lower() == "dn":
+ continue
+ if deltaattr.get(att) is not None \
+ and deltaattr.get(att).flags() != FLAG_MOD_ADD:
+ doit = False
+ elif deltaattr.get(att) is None:
+ doit = False
if doit:
message(CHANGE, "Applying delta to @ATTRIBUTES")
deltaattr.dn = ldb.Dn(basesam, "@ATTRIBUTES")