from samba.dcerpc import misc
import binascii
+from samba.compat import PY3
+
+
+if PY3:
+ # cmp() exists only in Python 2
+ def cmp(a, b):
+ return (a > b) - (a < b)
+
def confirm(msg, forced=False, allow_all=False):
"""confirm an action with the user
v = cmp(dn1.binary, dn2.binary)
return v
+ # In Python3, __cmp__ is replaced by these 6 methods
+ def __eq__(self, other):
+ return self.__cmp__(other) == 0
+
+ def __ne__(self, other):
+ return self.__cmp__(other) != 0
+
+ def __lt__(self, other):
+ return self.__cmp__(other) < 0
+
+ def __le__(self, other):
+ return self.__cmp__(other) <= 0
+
+ def __gt__(self, other):
+ return self.__cmp__(other) > 0
+
+ def __ge__(self, other):
+ return self.__cmp__(other) >= 0
+
def get_binary_integer(self):
'''return binary part of a dsdb_Dn as an integer, or None'''
if self.prefix == '':
planpythontestsuite("none", "samba.tests.param", py3_compatible=True)
planpythontestsuite("none", "samba.tests.upgrade", py3_compatible=True)
planpythontestsuite("none", "samba.tests.core", py3_compatible=True)
-planpythontestsuite("none", "samba.tests.common")
+planpythontestsuite("none", "samba.tests.common", py3_compatible=True)
planpythontestsuite("none", "samba.tests.provision", py3_compatible=True)
planpythontestsuite("none", "samba.tests.password_quality", py3_compatible=True)
planpythontestsuite("none", "samba.tests.strings")