makepanda: Fix build error when flex is absent

This commit is contained in:
rdb 2021-01-02 19:29:56 +01:00
parent fd2041d209
commit 6690b2d86e
2 changed files with 2 additions and 2 deletions

View File

@ -1664,7 +1664,7 @@ def CompileFlex(wobj,wsrc,opts):
dashi = opts.count("FLEXDASHI")
flex = GetFlex()
want_version = GetValueOption(opts, "FLEXVERSION:")
if want_version:
if flex and want_version:
# Is flex at the required version for this file?
want_version = tuple(map(int, want_version.split('.')))
have_version = GetFlexVersion()

View File

@ -556,7 +556,7 @@ def GetFlex():
def GetFlexVersion():
flex = GetFlex()
if not flex:
return None
return (0, 0, 0)
try:
handle = subprocess.Popen(["flex", "--version"], executable=flex, stdout=subprocess.PIPE)