Skip to content

Commit 037827b

Browse files
committed
Fix logic when someone else added PYTHONPATH/EBPYTHONPREFIXES
1 parent 9f3cf6a commit 037827b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,8 +1458,9 @@ def make_module_extra(self, altroot=None, altversion=None):
14581458
raise EasyBuildError('Multiple python paths requires EBPYTHONPREFIXES: ' + ', '.join(python_paths))
14591459
elif python_paths:
14601460
# Add paths unless they were already added
1461-
if use_ebpythonprefixes and '' not in self.module_generator.added_paths_per_key['EBPYTHONPREFIXES']:
1462-
lines.append(self.module_generator.prepend_paths('EBPYTHONPREFIXES', ''))
1461+
if use_ebpythonprefixes:
1462+
if '' not in self.module_generator.added_paths_per_key['EBPYTHONPREFIXES']:
1463+
lines.append(self.module_generator.prepend_paths('EBPYTHONPREFIXES', ''))
14631464
elif python_paths[0] not in self.module_generator.added_paths_per_key['PYTHONPATH']:
14641465
lines.append(self.module_generator.prepend_paths('PYTHONPATH', python_paths))
14651466

0 commit comments

Comments
 (0)