mirror of
https://github.com/samba-team/samba.git
synced 2025-12-12 12:23:50 +03:00
python2 reduction: Merge remaining compat code into common
The remaining compat code (get_string, get_bytes, cmp) are useful helper routines which we should simply merge into common (especially since there is some duplication here). Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): David Mulder <dmulder@samba.org> Autobuild-Date(master): Fri Oct 2 14:49:36 UTC 2020 on sn-devel-184
This commit is contained in:
committed by
David Mulder
parent
85d2ff2f00
commit
a3cd315321
@@ -28,7 +28,7 @@ import re
|
||||
import shutil
|
||||
import samba
|
||||
|
||||
from samba.compat import cmp_fn
|
||||
from samba.common import cmp
|
||||
from samba import Ldb, version, ntacls
|
||||
from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE
|
||||
import ldb
|
||||
@@ -284,7 +284,7 @@ def dn_sort(x, y):
|
||||
len2 = len(tab2) - 1
|
||||
# Note: python range go up to upper limit but do not include it
|
||||
for i in range(0, minimum):
|
||||
ret = cmp_fn(tab1[len1 - i], tab2[len2 - i])
|
||||
ret = cmp(tab1[len1 - i], tab2[len2 - i])
|
||||
if ret != 0:
|
||||
return ret
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user