interpreter: Switch to prev_subdir on non-existant subdir (#571)

This commit is contained in:
Nirbheek Chauhan 2016-05-29 15:54:51 +05:30 committed by Jussi Pakkanen
parent cff4e7d299
commit 065dcee7f3
1 changed files with 1 additions and 0 deletions

View File

@ -1836,6 +1836,7 @@ class Interpreter():
self.build_def_files.append(buildfilename)
absname = os.path.join(self.environment.get_source_dir(), buildfilename)
if not os.path.isfile(absname):
self.subdir = prev_subdir
raise InterpreterException('Nonexistant build def file %s.' % buildfilename)
code = open(absname, encoding='utf8').read()
assert(isinstance(code, str))