From a75122d1f6b3cbdfb6456e4e559d66e6b8d77e25 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Mon, 14 Jan 2013 11:01:37 +0000 Subject: Make system check interactive in all commands --- (limited to 'devbot/command.py') diff --git a/devbot/command.py b/devbot/command.py index 0d9c809..b3bd6fc 100644 --- a/devbot/command.py +++ b/devbot/command.py @@ -4,7 +4,7 @@ import time from devbot import config -def run(args, test=False, retry=0): +def run(args, test=False, interactive=False, retry=0): if test: print " ".join(args) return @@ -12,7 +12,7 @@ def run(args, test=False, retry=0): log_file = None subprocess_args = {"args": args} - if config.log_path: + if config.log_path and not interactive: log_file = open(config.log_path, "a") subprocess_args["stdout"] = log_file subprocess_args["stderr"] = subprocess.STDOUT @@ -38,10 +38,10 @@ def run(args, test=False, retry=0): log_file.close() -def run_with_sudo(args, test=False, retry=0): +def run_with_sudo(args, test=False, interactive=False, retry=0): args_with_sudo = ["sudo"] args_with_sudo.extend(args) print " ".join(args_with_sudo) - run(args_with_sudo, test=test, retry=retry) + run(args_with_sudo, test=test, retry=retry, interactive=interactive) -- cgit v0.9.1