diff options
Diffstat (limited to 'devbot/command.py')
-rw-r--r-- | devbot/command.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/devbot/command.py b/devbot/command.py index c6ac319..8da8051 100644 --- a/devbot/command.py +++ b/devbot/command.py @@ -1,11 +1,12 @@ import subprocess -def run_command(args): +def run_command(args, test=False): print " ".join(args) - subprocess.check_call(args) + if not test: + subprocess.check_call(args) -def run_with_sudo(args): +def run_with_sudo(args, test=False): args_with_sudo = ["sudo"] args_with_sudo.extend(args) - run_command(args_with_sudo) + run_command(args_with_sudo, test=test) |