]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python compat: remove integer_types
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 4 Jul 2020 01:44:52 +0000 (13:44 +1200)
committerNoel Power <npower@samba.org>
Tue, 11 Aug 2020 16:37:35 +0000 (16:37 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
python/samba/compat.py
python/samba/tests/dcerpc/testrpc.py
python/samba/tests/messaging.py

index a6baa8dad1a098333bd45ec3683ddbf92abaf447..9ef60045bd3a6288f40fb02efb8af277790c1423 100644 (file)
@@ -72,7 +72,6 @@ if PY3:
     from functools import cmp_to_key as cmp_to_key_fn
 
     # compat types
-    integer_types = int,
     string_types = str
     text_type = str
     binary_type = bytes
index 537c23129d886284f9f83db7d7f0d1ca90d8da64..d4fc39e51f83f67a0e547b89085cef94d439f21e 100644 (file)
@@ -22,7 +22,6 @@ sys.path.insert(0, "bin/python")
 import samba
 import samba.tests
 from samba.dcerpc import drsuapi
-from samba.compat import integer_types
 import talloc
 
 talloc.enable_null_tracking()
@@ -99,7 +98,7 @@ class RpcTests(object):
             if isinstance(value, str):
                 # print "%s=\"%s\"" % (n, value)
                 pass
-            elif isinstance(value, integer_types):
+            elif isinstance(value, int):
                 # print "%s=%d" % (n, value)
                 pass
             elif isinstance(value, type):
index 6484d0655ffbab45839c438e22eb40bba604a784..7a4aa17b9d5de3512646d4c1571034c891528907 100644 (file)
@@ -26,7 +26,6 @@ from samba.ndr import ndr_print
 from samba.dcerpc import server_id
 import random
 import os
-from samba.compat import integer_types
 
 
 class MessagingTests(TestCase):
@@ -41,7 +40,7 @@ class MessagingTests(TestCase):
         def callback():
             pass
         msg_type = x.register((callback, None))
-        self.assertTrue(isinstance(msg_type, integer_types))
+        self.assertTrue(isinstance(msg_type, int))
         x.deregister(callback, msg_type)
 
     def test_all_servers(self):