From: Garming Sam Date: Wed, 13 Dec 2017 00:35:14 +0000 (+1300) Subject: domain_update: Add an additional error with revision X-Git-Tag: talloc-2.1.11~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5f7677af97065c9a95f7295003e9ed9d833628b;p=thirdparty%2Fsamba.git domain_update: Add an additional error with revision Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett --- 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