From a3c5de2585b44b8b697161dfad2859dd2ffbb536 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 9 Sep 2009 00:44:39 +0000 Subject: Handle None in protect path. --- numpy/distutils/command/scons.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'numpy/distutils/command') diff --git a/numpy/distutils/command/scons.py b/numpy/distutils/command/scons.py index b887d598c..fcc4223a4 100644 --- a/numpy/distutils/command/scons.py +++ b/numpy/distutils/command/scons.py @@ -228,9 +228,12 @@ def get_cxx_tool_path(compiler): def protect_path(path): """Convert path (given as a string) to something the shell will have no problem to understand (space, etc... problems).""" - # XXX: to this correctly, this is totally bogus for now (does not check for - # already quoted path, for example). - return '"' + path + '"' + if path: + # XXX: to this correctly, this is totally bogus for now (does not check for + # already quoted path, for example). + return '"' + path + '"' + else: + return '""' def parse_package_list(pkglist): return pkglist.split(",") -- cgit v1.2.1