summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/Tools/qt4.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py
index 1fe2294..6c54b1e 100644
--- a/BuildTools/SCons/Tools/qt4.py
+++ b/BuildTools/SCons/Tools/qt4.py
@@ -196,11 +196,11 @@ AutomocStatic = _Automoc('StaticObject')
def _detect(env):
"""Not really safe, but fast method to detect the QT library"""
- try: return env['QTDIR']
- except KeyError: pass
+ if 'QTDIR' in env :
+ return env['QTDIR']
- try: return os.environ['QTDIR']
- except KeyError: pass
+ if 'QTDIR' in os.environ :
+ return os.environ['QTDIR']
moc = None
if env["qt5"]: