Commit c9f4a7cd authored by Aaron Wells's avatar Aaron Wells

change-merged: Altering call to re.sub for compatibility with python 3.6

parent ef2e3f97
......@@ -40,7 +40,8 @@ def send_notifications(change_url, project, branch, submitter, commit):
git_log = subprocess.Popen(['git', '--git-dir=' + BASE_DIR + '/git/' + project + '.git', 'log', '--no-merges', commit + '^1..' + commit], stdout=subprocess.PIPE).communicate()[0]
# In launchpad's email api, leading whitespace followed by a keyword is how you send a command in your email.
# So, we need to remove the leading spaces from every line
git_log = re.sub('^[ ]+', '', git_log, 0, re.MULTILINE);
unindent = re.compile('^[ ]+', re.MULTILINE);
git_log = re.sub(unindent, '', git_log);
# Find bug numbers referenced in the git log
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment