From 658eeee50715d9fd334ae3fd3e0e21b6db6de0c4 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sat, 14 Jul 2007 21:35:26 -0400 Subject: [PATCH] Handle broken swig version that prints version info on stderr. --HG-- extra : convert_revision : 83021779c40972fa56893d21713c6115cd481bc4 --- SConstruct | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index fa2366963..ffcd84706 100644 --- a/SConstruct +++ b/SConstruct @@ -259,7 +259,8 @@ if not env.has_key('SWIG'): # Check for appropriate SWIG version swig_version = os.popen('swig -version').read().split() # First 3 words should be "SWIG Version x.y.z" -if swig_version[0] != 'SWIG' or swig_version[1] != 'Version': +if len(swig_version) < 3 or \ + swig_version[0] != 'SWIG' or swig_version[1] != 'Version': print 'Error determining SWIG version.' Exit(1) -- 2.30.2