[poky] [PATCH 1/4] python method fix
Qing He
qing.he at intel.com
Tue Dec 21 08:19:44 PST 2010
1. substitute '_' to '-' to avoid misrepresentation by smart data
2. export _parsed_fns
Signed-off-by: Qing He <qing.he at intel.com>
---
bitbake/lib/bb/methodpool.py | 6 ++++++
bitbake/lib/bb/parse/ast.py | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/methodpool.py b/bitbake/lib/bb/methodpool.py
index 1485b13..299c54d 100644
--- a/bitbake/lib/bb/methodpool.py
+++ b/bitbake/lib/bb/methodpool.py
@@ -82,3 +82,9 @@ def get_parsed_dict():
shortcut
"""
return _parsed_methods
+
+def get_parsed_fns():
+ """
+ used by environment restruct
+ """
+ return _parsed_fns
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 870ae65..dc56f21 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -138,7 +138,7 @@ class MethodNode:
class PythonMethodNode(AstNode):
def __init__(self, funcname, root, body, fn):
- self.func_name = funcname
+ self.func_name = re.sub('_', '-', funcname)
self.root = root
self.body = body
self.fn = fn
--
1.7.0
More information about the poky
mailing list