[elbe-devel] [PATCH 08/20] directories: add comment to state why setting envvars is ok at that point

Torben Hohn torben.hohn at linutronix.de
Fri Oct 12 11:27:54 CEST 2018


we want to ban setting values in os.environ() from elbe.
However, at some places this can and need not be avoided.

init_directories() is called very early in elbe initialisation.
its ok here.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/directories.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/elbepack/directories.py b/elbepack/directories.py
index 3909dbaa..dc46d7a0 100644
--- a/elbepack/directories.py
+++ b/elbepack/directories.py
@@ -32,6 +32,9 @@ def init_directories(elbe_relpath):
         examples_dir = os.path.join(elbe_dir, "examples")
 
         # Set XML catalog if elbe is run from source
+        #
+        # setting environment variables is ok at this point,
+        # because this is early initialisation code.
         xmlcat = os.path.join(elbe_dir, "schema/catalog.xml")
         if os.environ.get('XML_CATALOG_FILES') is None:
             os.environ['XML_CATALOG_FILES'] = xmlcat
-- 
2.11.0




More information about the elbe-devel mailing list