mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
14 lines
337 B
Python
14 lines
337 B
Python
import subprocess
|
|
|
|
|
|
def invoke(command):
|
|
"""Invoke sub-process."""
|
|
try:
|
|
output = subprocess.check_output(command, stderr=subprocess.STDOUT)
|
|
status = 0
|
|
except subprocess.CalledProcessError as error: # pragma: no cover
|
|
output = error.output
|
|
status = error.returncode
|
|
|
|
return status, output
|