diff options
Diffstat (limited to 'sources/pyside2/tests/registry')
-rw-r--r-- | sources/pyside2/tests/registry/init_platform.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py index ca2b2cb68..a324c36a2 100644 --- a/sources/pyside2/tests/registry/init_platform.py +++ b/sources/pyside2/tests/registry/init_platform.py @@ -73,7 +73,13 @@ elif os.path.exists(history_dir): fpath = os.path.join(history_dir, last_build, "build_dir.txt") if os.path.exists(fpath): with open(fpath) as f: - all_build_dir = f.read().strip() + f_contents = f.read().strip() + f_contents_split = f_contents.splitlines() + try: + all_build_dir = f_contents_split[0] + except IndexError: + print("Error: can't find the build dir in the given file '{}'".format(fpath)) + sys.exit(1) else: print(dedent(""" Can't find the build dir in the history. |