Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'devbot/command.py')
-rw-r--r--devbot/command.py8
1 files changed, 4 insertions, 4 deletions
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)