diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index a07ad63ba9..88735bc34a 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -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() diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 20f63577c8..9cac107de1 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -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)