We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcca7af commit 4160e19Copy full SHA for 4160e19
python/__init__.py
@@ -26,6 +26,7 @@
26
from builtins import zip
27
import os
28
29
+
30
def setupenv():
31
"""
32
Set the environment for Windows based on the .vars files from the
@@ -41,14 +42,18 @@ def setupenv():
41
42
path_split = PurePath(os.path.dirname(os.path.realpath(__file__))).parts
43
44
try:
- appname = os.environ['QGIS_ENVNAME']
45
+ appname = os.environ['QGIS_ENVNAME']
46
except KeyError:
47
appname = path_split[-3]
48
- envfile= list(path_split[:-4])
49
+ envfile = list(path_split[:-4])
50
envfile.append("bin")
51
envfile.append("{0}-bin.env".format(appname))
52
envfile = os.path.join(*envfile)
53
54
+ if not os.path.exists(envfile):
55
+ return
56
57
with open(envfile) as f:
58
for line in f:
59
linedata = line.split("=")
0 commit comments