SCons: Fix read_command so it can properly deal with command strings
authorNathan Binkert <nate@binkert.org>
Mon, 16 Feb 2009 04:38:49 +0000 (20:38 -0800)
committerNathan Binkert <nate@binkert.org>
Mon, 16 Feb 2009 04:38:49 +0000 (20:38 -0800)
SConstruct

index e65c2da39a2257704f282e1c70b62564565dc7d2..dc3addcd8a1c42fcfbef1da5a8b4b3321ab0b46e 100644 (file)
@@ -114,6 +114,9 @@ def read_command(cmd, **kwargs):
     this is sorta like `cmd` in shell"""
     from subprocess import Popen, PIPE, STDOUT
 
+    if isinstance(cmd, str):
+        cmd = cmd.split()
+
     no_exception = 'exception' in kwargs
     exception = kwargs.pop('exception', None)