diff options
author | Garming Sam <garming@catalyst.net.nz> | 2017-12-13 13:35:14 +1300 |
---|---|---|
committer | Garming Sam <garming@samba.org> | 2017-12-20 23:13:11 +0100 |
commit | b5f7677af97065c9a95f7295003e9ed9d833628b (patch) | |
tree | e988592c420dfa5ca5c29e73f1d15a068d4c3787 /python | |
parent | 60b70e9540847b780329c19fb6e9cc77a415f903 (diff) | |
download | samba-b5f7677af97065c9a95f7295003e9ed9d833628b.tar.gz |
domain_update: Add an additional error with revision
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/domain_update.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/samba/domain_update.py b/python/samba/domain_update.py index 7e99e55e064..1f8e5decc59 100644 --- a/python/samba/domain_update.py +++ b/python/samba/domain_update.py @@ -137,7 +137,12 @@ class DomainUpdate(object): self.check_updates_range(min_update, expected_update) expected_version = functional_level_to_version[functional_level] - if update_revision and int(res[0]['revision'][0]) < expected_version: + found_version = int(res[0]['revision'][0]) + if update_revision and found_version < expected_version: + if not self.fix: + raise DomainUpdateException("Revision is not high enough. Fix is set to False." + "\nExpected: %dGot: %d" % (expected_version, + found_version)) self.samdb.modify_ldif("""dn: %s changetype: modify replace: revision |