aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-09-05 18:32:18 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-09-05 18:32:18 +0200
commite99bc52284ede1cc43189b5ac8ac905cf8f5e64f (patch)
tree303df8773622b9ebd8a9b65f5b828527bddd33ce
parentvariables without quotation in ebuild-generator (diff)
downloadg-sorcery-e99bc52284ede1cc43189b5ac8ac905cf8f5e64f.tar.gz
g-sorcery-e99bc52284ede1cc43189b5ac8ac905cf8f5e64f.tar.bz2
g-sorcery-e99bc52284ede1cc43189b5ac8ac905cf8f5e64f.zip
gs_db_tool/gs_db_tool: pass package to lambda
-rw-r--r--gs_db_tool/gs_db_tool.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gs_db_tool/gs_db_tool.py b/gs_db_tool/gs_db_tool.py
index 5594a12..1b58cee 100644
--- a/gs_db_tool/gs_db_tool.py
+++ b/gs_db_tool/gs_db_tool.py
@@ -83,10 +83,10 @@ def add_var(pkg_db, args):
pkg_db.add_package(package, ebuild_data)
elif args.lambda_function:
- lmbd = "lambda ebuild_data: " + args.lambda_function
+ lmbd = "lambda package, ebuild_data: " + args.lambda_function
f = eval(lmbd)
for package, ebuild_data in pkg_db:
- value = f(ebuild_data)
+ value = f(package, ebuild_data)
ebuild_data[args.name] = value
pkg_db.add_package(package, ebuild_data)