From 0844c5aa22c60404044b4e6dfa51ec301194cb2a Mon Sep 17 00:00:00 2001 From: Noel Power Date: Fri, 9 Mar 2018 14:07:31 +0000 Subject: lib/tdb: convert print func to be py2/py3 compatible Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- lib/tdb/python/tdbdump.py | 5 +++-- 1 file 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 " + print("Usage: tdbdump.py ") 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)) -- cgit v1.2.1