Skip to content

Commit 2e6bd7a

Browse files
casparvlboegel
andauthored
Update easybuild/framework/easyconfig/templates.py
Co-authored-by: Kenneth Hoste <[email protected]>
1 parent 6d6571a commit 2e6bd7a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

easybuild/framework/easyconfig/templates.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,9 @@ def template_constant_dict(config, ignore=None, skip_lower=None, toolchain=None)
203203
# set 'arch' for system architecture based on 'machine' (4th) element of platform.uname() return value
204204
template_values['arch'] = platform.uname()[4]
205205

206-
# set 'sysroot' based on sysroot build option
207-
sysroot = build_option('sysroot')
208-
if sysroot is None:
209-
template_values['sysroot'] = ""
210-
else:
211-
template_values['sysroot'] = sysroot
206+
# set 'sysroot' template based on 'sysroot' configuration option, using empty string as fallback
207+
value
208+
template_values['sysroot'] = build_option('sysroot') or ''
212209

213210
# step 1: add TEMPLATE_NAMES_EASYCONFIG
214211
for name in TEMPLATE_NAMES_EASYCONFIG:

0 commit comments

Comments
 (0)