瀏覽代碼

Don't emit vars starting with __, as those are internal

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson 14 年之前
父節點
當前提交
211f44ce0e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/bb/data.py

+ 1 - 1
lib/bb/data.py

@@ -223,7 +223,7 @@ def emit_env(o=sys.__stdout__, d = init(), all=False):
     """Emits all items in the data store in a format such that it can be sourced by a shell."""
 
     isfunc = lambda key: bool(d.getVarFlag(key, "func"))
-    keys = sorted(d.keys(), key=isfunc)
+    keys = sorted((key for key in d.keys() if not key.startswith("__")), key=isfunc)
     grouped = groupby(keys, isfunc)
     for isfunc, keys in grouped:
         for key in keys: