[Treepkg-commits] r539 - trunk/bin
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Sep 3 13:35:36 CEST 2011
Author: bricks
Date: 2011-09-03 13:35:36 +0200 (Sat, 03 Sep 2011)
New Revision: 539
Modified:
trunk/bin/sendnotificationmails.py
Log:
Use shlex.split for build_listpanding command because the string may contain arguments like --config-file foo.cfg
When returning lists cmdexpand replacement variable must use @ instead of $
Modified: trunk/bin/sendnotificationmails.py
===================================================================
--- trunk/bin/sendnotificationmails.py 2011-09-03 10:55:32 UTC (rev 538)
+++ trunk/bin/sendnotificationmails.py 2011-09-03 11:35:36 UTC (rev 539)
@@ -23,7 +23,8 @@
from treepkg.cmdexpand import cmdexpand
notification_desc = [("build_user", str, ""), ("build_host", str, ""),
- "build_listpending", "notification_template",
+ ("build_listpending", shlex.split),
+ "notification_template",
"smtp_host", ("smtp_port", int),
]
@@ -59,10 +60,10 @@
template = open(config["notification_template"]).read()
if not config.get("build_user") or not config.get("build_host"):
- lines = capture_output(cmdexpand("$build_listpending", **config))
+ lines = capture_output(cmdexpand("@build_listpending", **config))
else:
lines = capture_output(cmdexpand("ssh $build_user$@$build_host"
- " $build_listpending",
+ " @build_listpending",
**config))
for line in lines.splitlines():
words = line.split()
More information about the Treepkg-commits
mailing list