prevent UnboundLocalError when sourcing files (#10950)

Patch extracted from #7536 courtesy of @mgsternberg
This commit is contained in:
Stephen McDowell 2019-03-21 03:08:29 -07:00 committed by Massimiliano Culpo
parent bffe3a605f
commit 70e436e932

View File

@ -542,6 +542,7 @@ def return_separator_if_any(*args):
search = sep.join(after_list[start:end + 1])
except IndexError:
env.prepend_path(x, after)
continue
if search not in before:
# We just need to set the variable to the new value