aboutsummaryrefslogtreecommitdiffstats
path: root/qtinfo.py
diff options
context:
space:
mode:
authorThomas-Karl Pietrowski <thopiekar@googlemail.com>2016-02-03 18:24:38 +0100
committerThomas-Karl Pietrowski <thopiekar@googlemail.com>2016-02-03 18:24:38 +0100
commite3eb4a6d3e29402a062217dde21d8918108a398a (patch)
tree39b71a3e997fdd06c46cecfba261d031451ffd77 /qtinfo.py
parent32938327b041c80acb057904ea72fd8582e6c4e1 (diff)
Hotfix: correcting variable name
Like an user noticed (thanks for that), I just missed to rename a variable. So I just fixed it and added made the code at this place a little bit more failsave. https://github.com/PySide/pyside2-setup/commit/ca90a050c12f52bf5f4fb55f721ee5811f583afe#commitcomment-15862337
Diffstat (limited to 'qtinfo.py')
-rw-r--r--qtinfo.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/qtinfo.py b/qtinfo.py
index ebf781128..998f92385 100644
--- a/qtinfo.py
+++ b/qtinfo.py
@@ -10,7 +10,12 @@ class QtInfo(object):
self._qmake_command = [find_executable("qmake"),]
def getQMakePath(self):
- return self._qmake_path
+ qmake_path = self._qmake_path[0] # Guessing the first of the commands is qmake
+ if not os.path.exists(qmake_path): # Making it here a bit more failsave.
+ qmake_path = find_executable(qmake_path) # In case someone just passed the name of the executable I'll search for it now.
+ if qmake_path == None: # If we couldn't resolv the location of the executable
+ raise ValueError("Could not find the location of %s. Please pass the absolute path to qmake or please pass the correct name of the executable." %(qmake_path))
+ return qmake_path
def getVersion(self):
return self.getProperty("QT_VERSION")