# HG changeset patch # User Bjoern Ricks # Date 1315049736 0 # Node ID 8f62a825addb0a01373878995e8f7d564337f08f # Parent 87a0be76b5b747e244c3f67d6e5aee62d8366e61 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 $ diff -r 87a0be76b5b7 -r 8f62a825addb bin/sendnotificationmails.py --- a/bin/sendnotificationmails.py Sat Sep 03 10:55:32 2011 +0000 +++ b/bin/sendnotificationmails.py Sat Sep 03 11:35:36 2011 +0000 @@ -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()