diff --git a/scripts/powerline-release.py b/scripts/powerline-release.py index 39b1abc5..e916e74d 100755 --- a/scripts/powerline-release.py +++ b/scripts/powerline-release.py @@ -7,7 +7,7 @@ import codecs import os import re -from subprocess import check_output, check_call +from subprocess import check_output, check_call, CalledProcessError from getpass import getpass from github import Github @@ -50,7 +50,10 @@ def parse_version(s): def merge(version_string, rev, **kwargs): check_call(['git', 'checkout', 'master']) - check_call(['git', '-c', 'merge.tool=vimdiff', 'merge', '--no-ff', '--no-commit', '--log', rev]) + try: + check_call(['git', 'merge', '--no-ff', '--no-commit', '--log', rev]) + except CalledProcessError: + check_call(['git', 'mergetool', '--tool', 'vimdiff2']) with codecs.open('.setup.py.new', 'w', encoding='utf-8') as NS: with codecs.open('setup.py', 'r', encoding='utf-8') as OS: