mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
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>
This commit is contained in:
committed by
Andrew Bartlett
parent
9c251740b4
commit
a8aab19b90
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Originally based on ./sam.py
|
||||
from __future__ import print_function
|
||||
import optparse
|
||||
import sys
|
||||
import os
|
||||
@ -65,7 +66,7 @@ class LATests(samba.tests.TestCase):
|
||||
try:
|
||||
self.samdb.delete(self.ou, ['tree_delete:1'])
|
||||
except ldb.LdbError as e:
|
||||
print "tried deleting %s, got error %s" % (self.ou, e)
|
||||
print("tried deleting %s, got error %s" % (self.ou, e))
|
||||
self.samdb.add({'objectclass': 'organizationalUnit',
|
||||
'dn': self.ou})
|
||||
|
||||
@ -145,9 +146,9 @@ class LATests(samba.tests.TestCase):
|
||||
results = sorted(results)
|
||||
|
||||
if expected != results:
|
||||
print msg
|
||||
print "expected %s" % expected
|
||||
print "received %s" % results
|
||||
print(msg)
|
||||
print("expected %s" % expected)
|
||||
print("received %s" % results)
|
||||
|
||||
self.assertEqual(results, expected)
|
||||
|
||||
@ -208,7 +209,7 @@ class LATests(samba.tests.TestCase):
|
||||
|
||||
def test_la_backlinks_reveal(self):
|
||||
if opts.no_reveal_internals:
|
||||
print 'skipping because --no-reveal-internals'
|
||||
print('skipping because --no-reveal-internals')
|
||||
return
|
||||
self._test_la_backlinks(True)
|
||||
|
||||
@ -236,7 +237,7 @@ class LATests(samba.tests.TestCase):
|
||||
|
||||
def test_la_backlinks_delete_group_reveal(self):
|
||||
if opts.no_reveal_internals:
|
||||
print 'skipping because --no-reveal-internals'
|
||||
print('skipping because --no-reveal-internals')
|
||||
return
|
||||
self._test_la_backlinks_delete_group(True)
|
||||
|
||||
@ -350,7 +351,7 @@ class LATests(samba.tests.TestCase):
|
||||
|
||||
def test_la_links_delete_link_reveal(self):
|
||||
if opts.no_reveal_internals:
|
||||
print 'skipping because --no-reveal-internals'
|
||||
print('skipping because --no-reveal-internals')
|
||||
return
|
||||
self._test_la_links_delete_link_reveal()
|
||||
|
||||
|
Reference in New Issue
Block a user