| Index: appengine/findit/common/repo_util.py
|
| diff --git a/appengine/findit/common/repo_util.py b/appengine/findit/common/repo_util.py
|
| index 644b44aebf6c8f2e08ed3ca57b644cf7604cccc3..860e386090aab701a043a0287c378658df5b9a1b 100644
|
| --- a/appengine/findit/common/repo_util.py
|
| +++ b/appengine/findit/common/repo_util.py
|
| @@ -4,6 +4,7 @@
|
|
|
| import json
|
| import re
|
| +import subprocess
|
| import urllib2
|
|
|
| CODE_REVIEW_URL_PATTERN = re.compile(
|
| @@ -72,3 +73,18 @@ def GetRevertedRevision(message):
|
| reverted_revision_match = REVERTED_REVISION_PATTERN.match(line)
|
| if reverted_revision_match:
|
| return reverted_revision_match.group(1)
|
| +
|
| +
|
| +# TODO(katesonia): Add local cache for this function.
|
| +def GetCommandOutput(command):
|
| + """Gets the output stream of executable command.
|
| +
|
| + Args:
|
| + command (str): Command to execute to get output.
|
| +
|
| + Return:
|
| + Output steam of the command.
|
| + """
|
| + p = subprocess.Popen(
|
| + command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
|
| + return p.communicate()[0]
|
|
|