Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ALF
pyALF
Commits
045d5143
Commit
045d5143
authored
Jul 28, 2020
by
Jonas Schwab
Browse files
tweak getenv
parent
d2231665
Changes
1
Hide whitespace changes
Inline
Side-by-side
py_alf.py
View file @
045d5143
...
...
@@ -8,6 +8,7 @@ __copyright__ = "Copyright 2020, The ALF Project"
__license__
=
"GPL"
import
os
import
re
import
subprocess
from
shutil
import
copyfile
import
numpy
as
np
...
...
@@ -258,9 +259,12 @@ def getenv(config, alf_dir='.'):
lines
=
f
.
readlines
()
env
=
{}
for
line
in
lines
:
item
=
line
.
strip
().
split
(
"="
,
1
)
if
len
(
item
)
==
2
:
env
[
item
[
0
]]
=
item
[
1
]
if
(
not
re
.
search
(
r
"^BASH_FUNC.*%%=()"
,
line
))
and
'='
in
line
:
item
=
line
.
strip
().
split
(
"="
,
1
)
if
len
(
item
)
==
2
:
env
[
item
[
0
]]
=
item
[
1
]
else
:
env
[
item
[
0
]]
=
''
return
env
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment