1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

s3/script/tests: 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:
Noel Power 2018-03-09 14:04:29 +00:00 committed by Andrew Bartlett
parent 40e7d57999
commit 220f19fce0

View File

@ -1,10 +1,11 @@
#!/usr/bin/env python
from __future__ import print_function
import sys,os,subprocess
if len(sys.argv) != 3:
print "Usage: test_wbinfo_sids2xids_int.py wbinfo net"
print("Usage: test_wbinfo_sids2xids_int.py wbinfo net")
sys.exit(1)
wbinfo = sys.argv[1]
@ -78,7 +79,7 @@ def check_singular(sids, ids, idtype='gid'):
outid = subprocess.Popen([wbinfo, '--sid-to-%s' % idtype, sid],
stdout=subprocess.PIPE).communicate()[0].strip()
if outid != ids[i]:
print "Expected %s, got %s\n" % (outid, ids[i])
print("Expected %s, got %s\n" % (outid, ids[i]))
flush_cache(sids=sids, uids=uids, gids=gids)
sys.exit(1)
i += 1
@ -94,7 +95,7 @@ def check_multiple(sids, idtypes):
result = line.split(' ')[2:]
if result[0] != idtypes[i]:
print "Expected %s, got %s\n" % (idtypes[i], result[0])
print("Expected %s, got %s\n" % (idtypes[i], result[0]))
flush_cache(sids=sids, uids=uids, gids=gids)
sys.exit(1)
i += 1