diff options
author | Ondrej Oprala | 2013-08-29 14:57:04 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-20 12:48:53 +0200 |
commit | 464074532c0d1898f945a00c2f143e5b3ca59601 (patch) | |
tree | beb19a7e647b6738c57a822d7c4fdb8992042bb0 /libmount/python/test_mount_tab_update.py | |
parent | build-sys: support --with-python[={2,3}] (diff) | |
download | kernel-qcow2-util-linux-464074532c0d1898f945a00c2f143e5b3ca59601.tar.gz kernel-qcow2-util-linux-464074532c0d1898f945a00c2f143e5b3ca59601.tar.xz kernel-qcow2-util-linux-464074532c0d1898f945a00c2f143e5b3ca59601.zip |
pylibmount: rewrite to be py2/py3 universal
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/python/test_mount_tab_update.py')
-rwxr-xr-x | libmount/python/test_mount_tab_update.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libmount/python/test_mount_tab_update.py b/libmount/python/test_mount_tab_update.py index 5433cf580..f1b0332d0 100755 --- a/libmount/python/test_mount_tab_update.py +++ b/libmount/python/test_mount_tab_update.py @@ -1,4 +1,3 @@ -#!/bin/python2 import os import sys import stat @@ -6,11 +5,11 @@ import errno import libmount as mnt def usage(tss): - print "\nUsage:\n\t{:s} <test> [testoptions]\nTests:\n".format(sys.argv[0]) + print("\nUsage:\n\t{:s} <test> [testoptions]\nTests:\n".format(sys.argv[0])) for i in tss: - print "\t{15:-s}".format(i[0]) + print("\t{15:-s}".format(i[0])) if i[2] != "": - print " {:s}\n".format(i[2]) + print(" {:s}\n".format(i[2])) print("\n") return 1 @@ -27,7 +26,7 @@ def mnt_run_test(tss, argv): if i[0] == argv[1]: rc = i[1](i, argv[1:]) if rc: - print "FAILED [rc={:d}]".format(rc) + print("FAILED [rc={:d}]".format(rc)) break if ((rc < 0) and (i == ())): |