summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/upgradehelpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python/samba/upgradehelpers.py')
-rwxr-xr-xsource4/scripting/python/samba/upgradehelpers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py
index 2bc1795fbc..cc8322f361 100755
--- a/source4/scripting/python/samba/upgradehelpers.py
+++ b/source4/scripting/python/samba/upgradehelpers.py
@@ -732,6 +732,7 @@ def increment_calculated_keyversion_number(samdb, rootdn, hashDns):
scope=SCOPE_SUBTREE, attrs=["msDs-KeyVersionNumber"],
controls=["search_options:1:2"])
done = 0
+ hashDone = {}
if len(entry) == 0:
raise ProvisioningError("Unable to find msDs-KeyVersionNumber")
else:
@@ -739,7 +740,7 @@ def increment_calculated_keyversion_number(samdb, rootdn, hashDns):
if hashDns.has_key(str(e.dn).lower()):
val = e.get("msDs-KeyVersionNumber")
if not val:
- continue
+ val = "0"
version = int(str(hashDns[str(e.dn).lower()]))
if int(str(val)) < version:
done = done + 1