diff options
author | Noel Power <noel.power@suse.com> | 2018-03-09 14:07:31 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-03-23 07:28:24 +0100 |
commit | 0844c5aa22c60404044b4e6dfa51ec301194cb2a (patch) | |
tree | c8e4ce6b52876cd00fe77426c2163df2dd82147a | |
parent | 7b897d6d1c58df0d0914cfcb063d0f60943b1332 (diff) | |
download | samba-0844c5aa22c60404044b4e6dfa51ec301194cb2a.tar.gz |
lib/tdb: 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>
-rw-r--r-- | lib/tdb/python/tdbdump.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tdb/python/tdbdump.py b/lib/tdb/python/tdbdump.py index 01859ebce26..a16d26ed523 100644 --- a/lib/tdb/python/tdbdump.py +++ b/lib/tdb/python/tdbdump.py @@ -1,12 +1,13 @@ #!/usr/bin/env python # Trivial reimplementation of tdbdump in Python +from __future__ import print_function import tdb, sys if len(sys.argv) < 2: - print "Usage: tdbdump.py <tdb-file>" + print("Usage: tdbdump.py <tdb-file>") sys.exit(1) db = tdb.Tdb(sys.argv[1]) for (k, v) in db.iteritems(): - print "{\nkey(%d) = %r\ndata(%d) = %r\n}" % (len(k), k, len(v), v) + print("{\nkey(%d) = %r\ndata(%d) = %r\n}" % (len(k), k, len(v), v)) |