diff options
author | Noel Power <noel.power@suse.com> | 2018-03-09 13:57:01 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-03-23 07:28:24 +0100 |
commit | a8aab19b90324a02f11cd09c79b8b38522f451ca (patch) | |
tree | b9a614b8fe212546b1b3b5e8ba022e7f37efd70c /source4/dsdb/tests/python/ad_dc_search_performance.py | |
parent | 9c251740b42b04eb0c277bc7975170e0fa784ebf (diff) | |
download | samba-a8aab19b90324a02f11cd09c79b8b38522f451ca.tar.gz |
s3/dsdb: convert print func to be py2/py3 compatible
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4/dsdb/tests/python/ad_dc_search_performance.py')
-rw-r--r-- | source4/dsdb/tests/python/ad_dc_search_performance.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source4/dsdb/tests/python/ad_dc_search_performance.py b/source4/dsdb/tests/python/ad_dc_search_performance.py index 151fb69b666..2b8c52edf76 100644 --- a/source4/dsdb/tests/python/ad_dc_search_performance.py +++ b/source4/dsdb/tests/python/ad_dc_search_performance.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import print_function + import optparse import sys sys.path.insert(0, 'bin/python') @@ -153,8 +155,9 @@ class UserTests(samba.tests.TestCase): expression=expression, scope=SCOPE_SUBTREE, attrs=['cn']) - print >> sys.stderr, '%d %s took %s' % (i, expression, - time.time() - t) + print('%d %s took %s' % (i, expression, + time.time() - t), + file=sys.stderr) def _test_indexed_search(self): expressions = ['(objectclass=group)', @@ -167,8 +170,9 @@ class UserTests(samba.tests.TestCase): expression=expression, scope=SCOPE_SUBTREE, attrs=['cn']) - print >> sys.stderr, '%d runs %s took %s' % (i, expression, - time.time() - t) + print('%d runs %s took %s' % (i, expression, + time.time() - t), + file=sys.stderr) def _test_complex_search(self): classes = ['samaccountname', 'objectCategory', 'dn', 'member'] @@ -196,7 +200,7 @@ class UserTests(samba.tests.TestCase): '(', n2, c2, o2, v2, '))' if n2 else ')', ')']) - print expression + print(expression) self.ldb.search(self.ou, expression=expression, scope=SCOPE_SUBTREE, @@ -219,8 +223,9 @@ class UserTests(samba.tests.TestCase): expression=expression, scope=SCOPE_SUBTREE, attrs=['cn']) - print >> sys.stderr, '%d runs %s took %s' % (i, expression, - time.time() - t) + print('%d runs %s took %s' % (i, expression, + time.time() - t), + file=sys.stderr) def _test_add_many_users(self, n=BATCH_SIZE): s = self.state.next_user_id |