projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71d43fc
)
move reading of os.environ out of a global which prohibits
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 5 Sep 2022 23:07:46 +0000
(
00:07
+0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 5 Sep 2022 23:07:46 +0000
(
00:07
+0100)
setting of os.environ at runtime
src/openpower/util.py
patch
|
blob
|
history
diff --git
a/src/openpower/util.py
b/src/openpower/util.py
index 7c0a29bf002e7006a655de217021057bd1b36845..71952de5e9229a21e6889a8ed65b307c5a7d0232 100644
(file)
--- a/
src/openpower/util.py
+++ b/
src/openpower/util.py
@@
-131,7
+131,6
@@
def parse_log_env_vars():
return retval
-LOG_KINDS_SILENCED = parse_log_env_vars()
def log(*args, kind=LogKind.Default, **kwargs):
@@
-139,6
+138,9
@@
def log(*args, kind=LogKind.Default, **kwargs):
"""
# look up in a dict rather than os.environ so we don't
# trigger breakpoints on raising exceptions.
+ # read os.environ so that modifications to os.environ at runtime
+ # are picked up
+ LOG_KINDS_SILENCED = parse_log_env_vars()
if LOG_KINDS_SILENCED[kind]:
return
print(*args, **kwargs)