diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2012-07-26 09:15:09 +0000 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2012-07-26 09:15:09 +0000 |
| commit | e6f2e886a4246098eefae9d9a564b321b28280c2 (patch) | |
| tree | e1dc714dc1ec22d5cbc4a98d284721516061824d | |
| parent | e238e07692c747ddcb0c70452578a812836cea67 (diff) | |
| download | nova-e6f2e886a4246098eefae9d9a564b321b28280c2.tar.gz nova-e6f2e886a4246098eefae9d9a564b321b28280c2.tar.xz nova-e6f2e886a4246098eefae9d9a564b321b28280c2.zip | |
Replace subprocess.check_output with Popen
The check_output method does not exist in python 2.6
Fixes bug 1029014
Change-Id: I1ee24fa2029f21706924cc19dfcbc41655b022e6
| -rwxr-xr-x | tools/hacking.py | 8 |
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 |
