iotests: open notrun files in text mode

Replace the binary mode with the default text one when *.notrun
files are opened for skipped tests. That change is made for the
compatibility with Python 3 which returns error otherwise.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Andrey Shinkevich 2019-03-07 16:33:57 +03:00 committed by Kevin Wolf
parent af39bd0d9a
commit ce090f656c

View File

@ -712,7 +712,7 @@ def notrun(reason):
# Each test in qemu-iotests has a number ("seq") # Each test in qemu-iotests has a number ("seq")
seq = os.path.basename(sys.argv[0]) seq = os.path.basename(sys.argv[0])
open('%s/%s.notrun' % (output_dir, seq), 'wb').write(reason + '\n') open('%s/%s.notrun' % (output_dir, seq), 'w').write(reason + '\n')
print('%s not run: %s' % (seq, reason)) print('%s not run: %s' % (seq, reason))
sys.exit(0) sys.exit(0)