diff options
Diffstat (limited to 'devbot/command.py')
-rw-r--r-- | devbot/command.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devbot/command.py b/devbot/command.py new file mode 100644 index 0000000..c6ac319 --- /dev/null +++ b/devbot/command.py @@ -0,0 +1,11 @@ +import subprocess + +def run_command(args): + print " ".join(args) + subprocess.check_call(args) + +def run_with_sudo(args): + args_with_sudo = ["sudo"] + args_with_sudo.extend(args) + + run_command(args_with_sudo) |