From b5f7677af97065c9a95f7295003e9ed9d833628b Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Wed, 13 Dec 2017 13:35:14 +1300 Subject: [PATCH] domain_update: Add an additional error with revision Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett --- python/samba/domain_update.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.47.3