diff options
| -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 |
