|
@@ -1,6 +1,6 @@
|
1
|
1
|
|
2
|
2
|
|
3
|
|
-
|
|
3
|
+
|
4
|
4
|
|
5
|
5
|
import os
|
6
|
6
|
import re
|
|
@@ -25,9 +25,12 @@ def check_envs(build_env, base_envs, config):
|
25
|
25
|
return True
|
26
|
26
|
ext = config.get(build_env, 'extends', default=None)
|
27
|
27
|
if ext:
|
28
|
|
- for ext_env in ext:
|
29
|
|
- if check_envs(ext_env, base_envs, config):
|
30
|
|
- return True
|
|
28
|
+ if isinstance(ext, str):
|
|
29
|
+ return check_envs(ext, base_envs, config)
|
|
30
|
+ elif isinstance(ext, list):
|
|
31
|
+ for ext_env in ext:
|
|
32
|
+ if check_envs(ext_env, base_envs, config):
|
|
33
|
+ return True
|
31
|
34
|
return False
|
32
|
35
|
|
33
|
36
|
|
|
@@ -56,7 +59,7 @@ if not result:
|
56
|
59
|
|
57
|
60
|
|
58
|
61
|
for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]:
|
59
|
|
- for f in [ "Configuration.h", "Configuration_adv.h" ]:
|
60
|
|
- if os.path.isfile(os.path.join(p, f)):
|
61
|
|
- err = "ERROR: Config files found in directory %s. Please move them into the Marlin subfolder." % p
|
62
|
|
- raise SystemExit(err)
|
|
62
|
+ for f in [ "Configuration.h", "Configuration_adv.h" ]:
|
|
63
|
+ if os.path.isfile(os.path.join(p, f)):
|
|
64
|
+ err = "ERROR: Config files found in directory %s. Please move them into the Marlin subfolder." % p
|
|
65
|
+ raise SystemExit(err)
|