Fix ansible-test base branch handling on merge. (#22759)

(cherry picked from commit 991bf0a1c3)
This commit is contained in:
Matt Clay 2017-03-17 23:33:32 -07:00
parent 0e864fd81b
commit 5ae1967aea

View file

@ -1136,9 +1136,12 @@ class SanityConfig(TestConfig):
self.base_branch = args.base_branch # str
elif is_shippable():
try:
self.base_branch = 'origin/%s' % os.environ['BASE_BRANCH'] # str
self.base_branch = os.environ['BASE_BRANCH'] # str
except KeyError as ex:
raise MissingEnvironmentVariable(name=ex.args[0])
if self.base_branch:
self.base_branch = 'origin/%s' % self.base_branch
else:
self.base_branch = ''