diff options
Diffstat (limited to 'testing/command.py')
| -rw-r--r-- | testing/command.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testing/command.py b/testing/command.py index 6b2a18e62..9ef35ee20 100644 --- a/testing/command.py +++ b/testing/command.py @@ -39,6 +39,7 @@ import argparse import os import sys from collections import OrderedDict +from pathlib import Path from textwrap import dedent from timeit import default_timer as timer @@ -167,7 +168,7 @@ def main(): group.add_argument( "--blacklist", "-b", - type=argparse.FileType("r"), + type=str, default=blacklist_default, help=f"a Qt blacklist file (default: {blacklist_default})", ) @@ -195,7 +196,7 @@ def main(): ) parser_getcwd = subparsers.add_parser("getcwd") parser_getcwd.add_argument( - "filename", type=argparse.FileType("w"), help="write the build dir name into a file" + "filename", type=str, help="write the build dir name into a file" ) parser_getcwd.add_argument( "--buildno", @@ -213,8 +214,8 @@ def main(): sys.exit(1) if args.subparser_name == "getcwd": - print(builds.selected.build_dir, file=args.filename) - print(builds.selected.build_dir, "written to file", args.filename.name) + Path(args.filename).write_text(builds.selected.build_dir + '\n') + print(builds.selected.build_dir, "written to file", args.filename) sys.exit(0) elif args.subparser_name == "test": runs = args.reruns @@ -235,8 +236,7 @@ def main(): sys.exit(1) if args.blacklist: - args.blacklist.close() - bl = BlackList(args.blacklist.name) + bl = BlackList(args.blacklist) else: bl = BlackList(None) if args.environ: |
