From: Joe Guo Date: Tue, 10 Apr 2018 00:58:52 +0000 (+1200) Subject: kcc/kcc_utils: fix divide for py3 X-Git-Tag: ldb-1.4.0~585 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=949109442f7d74b2bab820c6ef0a5a80685b5694;p=thirdparty%2Fsamba.git kcc/kcc_utils: fix divide for py3 `/` will return float other than int in py3. Use `//` to keep consistent with py2. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py index a4870a3e7c8..6e15c0b1e31 100644 --- a/python/samba/kcc/kcc_utils.py +++ b/python/samba/kcc/kcc_utils.py @@ -1669,7 +1669,7 @@ class Site(object): # # Note: We don't want to divide by zero here so they must # have meant "f" instead of "o!interSiteTopologyFailover" - k_idx = (i_idx + ((self.nt_now - t_time) / f)) % len(D_sort) + k_idx = (i_idx + ((self.nt_now - t_time) // f)) % len(D_sort) # The local writable DC acts as an ISTG for its site if and # only if dk is the nTDSDSA object for the local DC. If the