diff --git a/python/samba/gpclass.py b/python/samba/gpclass.py index 008599bd53f..106bed26cdd 100644 --- a/python/samba/gpclass.py +++ b/python/samba/gpclass.py @@ -224,8 +224,7 @@ class gp_log: for attr in attrs: func = None if attr.attrib['name'] in data_maps[ext.attrib['name']]: - func = data_maps[ext.attrib['name']]\ - [attr.attrib['name']][-1] + func = data_maps[ext.attrib['name']][attr.attrib['name']][-1] else: for dmap in data_maps[ext.attrib['name']].keys(): if data_maps[ext.attrib['name']][dmap][0] == \ diff --git a/python/samba/subunit/__init__.py b/python/samba/subunit/__init__.py index ae208430d16..c6203c30afb 100644 --- a/python/samba/subunit/__init__.py +++ b/python/samba/subunit/__init__.py @@ -45,7 +45,7 @@ class RemotedTestCase(unittest.TestCase): actions. """ - def __eq__ (self, other): + def __eq__(self, other): try: return self.__description == other.__description except AttributeError: diff --git a/source4/dsdb/tests/python/rodc_rwdc.py b/source4/dsdb/tests/python/rodc_rwdc.py index 653e0404bf8..4b6c68486ad 100644 --- a/source4/dsdb/tests/python/rodc_rwdc.py +++ b/source4/dsdb/tests/python/rodc_rwdc.py @@ -84,7 +84,7 @@ def set_auto_replication(dc, allow): if p.returncode: if 'LDAP_REFERRAL' not in stderr: raise RodcRwdcTestException() - print ("ignoring +%s REFERRAL error; assuming %s is RODC" % + print("ignoring +%s REFERRAL error; assuming %s is RODC" % (opt, dc)) diff --git a/source4/dsdb/tests/python/sort.py b/source4/dsdb/tests/python/sort.py index d41bb953f1d..2939aca3666 100644 --- a/source4/dsdb/tests/python/sort.py +++ b/source4/dsdb/tests/python/sort.py @@ -331,7 +331,7 @@ class BaseSortTests(samba.tests.TestCase): # Let's remind ourselves. if result_attr == "msTSExpireDate4": print('-' * 72) - print ("This test fails against Windows with the " + print("This test fails against Windows with the " "default number of elements (33).") print("Try with --elements=27 (or similar).") print('-' * 72) diff --git a/source4/dsdb/tests/python/vlv.py b/source4/dsdb/tests/python/vlv.py index 44c1f6ef32e..6e6ed393e41 100644 --- a/source4/dsdb/tests/python/vlv.py +++ b/source4/dsdb/tests/python/vlv.py @@ -558,7 +558,7 @@ class VLVTests(samba.tests.TestCase): skipped += 1 if expected_results != results: - print ("attr %s before %d after %d offset %d" % + print("attr %s before %d after %d offset %d" % (attr, before, after, offset)) self.assertEquals(expected_results, results) @@ -701,7 +701,7 @@ class VLVTests(samba.tests.TestCase): except ldb.LdbError as e: if offset != 0: raise - print ("offset %d denominator %d raised error " + print("offset %d denominator %d raised error " "expected error %s\n" "(offset zero is illegal unless " "content count is zero)" % @@ -740,7 +740,7 @@ class VLVTests(samba.tests.TestCase): cstr = str(c) if cstr.startswith('vlv_resp'): bits = cstr.rsplit(':') - print ("the answer is %s; we said %d" % + print("the answer is %s; we said %d" % (bits[2], real_offset)) break @@ -858,7 +858,7 @@ class VLVTests(samba.tests.TestCase): expression=expression, base=base, scope=ldb.SCOPE_ONELEVEL) - print ("searching for attr %s amongst %d deleted objects" % + print("searching for attr %s amongst %d deleted objects" % (attr, len(expected_order))) sort_control = "server_sort:1:0:%s" % attr step = max(len(expected_order) // 10, 1) @@ -1010,7 +1010,7 @@ class VLVTests(samba.tests.TestCase): print(middle) print(expected_order) print() - print ("\nattr %s offset %d before %d " + print("\nattr %s offset %d before %d " "after %d gte %s" % (attr, offset, before, after, gte)) self.assertEquals(expected_results, results)