diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2020-02-26 12:41:49 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2020-02-26 12:00:48 +0000 |
commit | 3a52269a1d5aad26cd6fb28b89311feec0ef76d0 (patch) | |
tree | d51e756cc179c3007a6a3f1815eb0e215a8b5ce3 /scripts | |
parent | c3c57087416985f41629ff7cb146ce064350bfec (diff) |
scripts: build.py: Handle Null path in default_python3()
Change-Id: Ice6b269502a77f31a7af447429bba4332df026e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/build.py b/scripts/build.py index 4724ece02a..ec50a21b8e 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -44,7 +44,9 @@ def default_python3(): path_system = os.path.join('/usr', 'bin') if not common.is_windows_platform() else None path = os.environ.get('PYTHON3_PATH') or path_system postfix = '.exe' if common.is_windows_platform() else '' - return existing_path(os.path.join(path, 'python3' + postfix)) or existing_path(os.path.join(path, 'python' + postfix)) + return (path if not path + else (existing_path(os.path.join(path, 'python3' + postfix)) or + existing_path(os.path.join(path, 'python' + postfix)))) def get_arguments(): parser = argparse.ArgumentParser(description='Build Qt Creator for packaging') |