summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-07-26 14:33:47 +0000
committerGerrit Code Review <review@openstack.org>2012-07-26 14:33:47 +0000
commitcf1cd2863afbc418dcd0056a575ec47807de7df6 (patch)
tree9f95d0424fc71dcd985df024b5011453183cbaf5 /tools
parent2578945be71f2e1b757e184b00eaf76220555889 (diff)
parente6f2e886a4246098eefae9d9a564b321b28280c2 (diff)
downloadnova-cf1cd2863afbc418dcd0056a575ec47807de7df6.tar.gz
nova-cf1cd2863afbc418dcd0056a575ec47807de7df6.tar.xz
nova-cf1cd2863afbc418dcd0056a575ec47807de7df6.zip
Merge "Replace subprocess.check_output with Popen"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/hacking.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index 3f876b747..ea490f748 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -386,7 +386,13 @@ def once_git_check_commit_title():
N801
"""
#Get title of most recent commit
- title = subprocess.check_output('git log --pretty=%s -1', shell=True)
+
+ subp = subprocess.Popen(['git', 'log', '--pretty=%s', '-1'],
+ stdout=subprocess.PIPE)
+ title = subp.communicate()[0]
+ if subp.returncode:
+ raise Exception("git log failed with code %s" % subp.returncode)
+
#From https://github.com/openstack/openstack-ci-puppet
# /blob/master/modules/gerrit/manifests/init.pp#L74
#Changeid|bug|blueprint