From d6924f803904d25a7f9cac2ec69f421d7a5bdeab Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 5 Mar 2012 03:27:40 +0100 Subject: selftest.run: Factor out expand_command_list. --- selftest/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'selftest/run.py') diff --git a/selftest/run.py b/selftest/run.py index 4ef10de142..c40dd7e389 100644 --- a/selftest/run.py +++ b/selftest/run.py @@ -15,7 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import os +import subprocess +import warnings # expand strings from %ENV def expand_environment_strings(s, vars): @@ -26,4 +27,7 @@ def expand_environment_strings(s, vars): return s - +def expand_command_list(cmd): + if not "$LISTOPT" in cmd: + return None + return cmd.replace("$LISTOPT", "--list") -- cgit