diff options
Diffstat (limited to 'wqflask/utility/external.py')
-rw-r--r-- | wqflask/utility/external.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wqflask/utility/external.py b/wqflask/utility/external.py new file mode 100644 index 00000000..50afea08 --- /dev/null +++ b/wqflask/utility/external.py @@ -0,0 +1,9 @@ +# Call external program + +import os +import sys +import subprocess + +def shell(command): + if subprocess.call(command, shell=True) != 0: + raise Exception("ERROR: failed on "+command) |