diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-12-21 23:15:30 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-12-21 23:26:11 +0200 |
commit | c7ea48bd5234ad44356339b076fff3b4d226cf37 (patch) | |
tree | 68c31e9a0e5b6a0f756957d1588b3d037a12efe3 /test/pbap-client | |
parent | 20baf80f00ec24b65de22e98b801757216ea9356 (diff) | |
download | bluez-c7ea48bd5234ad44356339b076fff3b4d226cf37.tar.gz |
test: Make OBEX related scripts python 3 compatible
Diffstat (limited to 'test/pbap-client')
-rwxr-xr-x | test/pbap-client | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/pbap-client b/test/pbap-client index a38b3ccc4..167384407 100755 --- a/test/pbap-client +++ b/test/pbap-client @@ -1,5 +1,7 @@ #!/usr/bin/python +from __future__ import absolute_import, print_function, unicode_literals + import gobject import sys @@ -39,11 +41,11 @@ class PbapClient: transfer.path = path transfer.filename = properties["Filename"] self.props[path] = transfer - print "Transfer created: %s (file %s)" % (path, - transfer.filename) + print("Transfer created: %s (file %s)" % (path, + transfer.filename)) def error(self, err): - print err + print(err) mainloop.quit() def transfer_complete(self, path): @@ -68,7 +70,7 @@ class PbapClient: f() def transfer_error(self, path): - print "Transfer %s error" % path + print("Transfer %s error" % path) mainloop.quit() def properties_changed(self, interface, properties, invalidated, path): @@ -117,7 +119,7 @@ if __name__ == '__main__': CLIENT_INTERFACE) if (len(sys.argv) < 2): - print "Usage: %s <device>" % (sys.argv[0]) + print("Usage: %s <device>" % (sys.argv[0])) sys.exit(1) print "Creating Session" @@ -127,9 +129,9 @@ if __name__ == '__main__': def process_result(lines, header): if header != None: - print header + print(header) for line in lines: - print line, + print(line), print def test_paths(paths): |