[examples-v2 commit] waf: Add null check for rtems_tools
Gedare Bloom
gedare at rtems.org
Thu Dec 12 19:49:54 UTC 2013
Module: examples-v2
Branch: master
Commit: 72a42499525fb3e501559a360b052684e446dfe4
Changeset: http://git.rtems.org/examples-v2/commit/?id=72a42499525fb3e501559a360b052684e446dfe4
Author: Chirayu Desai <cdesai at cyanogenmod.org>
Date: Wed Dec 4 15:25:12 2013 +0530
waf: Add null check for rtems_tools
If 'waf configure' is called without --rtems-tools, it'll be set to
None, leading to a TypeError.
Traceback (most recent call last):
File "/home/cdesai/bin/.waf-1.7.13-8c328f55ac27cdb03b8c949f189bbac3/waflib/Scripting.py", line 97, in waf_entry_point
run_commands()
File "/home/cdesai/bin/.waf-1.7.13-8c328f55ac27cdb03b8c949f189bbac3/waflib/Scripting.py", line 153, in run_commands
ctx=run_command(cmd_name)
File "/home/cdesai/bin/.waf-1.7.13-8c328f55ac27cdb03b8c949f189bbac3/waflib/Scripting.py", line 146, in run_command
ctx.execute()
File "/home/cdesai/bin/.waf-1.7.13-8c328f55ac27cdb03b8c949f189bbac3/waflib/Configure.py", line 128, in execute
super(ConfigurationContext,self).execute()
File "/home/cdesai/bin/.waf-1.7.13-8c328f55ac27cdb03b8c949f189bbac3/waflib/Context.py", line 87, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File "/home/cdesai/bin/.waf-1.7.13-8c328f55ac27cdb03b8c949f189bbac3/waflib/Context.py", line 128, in recurse
user_function(self)
File "/home/cdesai/rtems/examples-v2/wscript", line 29, in configure
rtems.configure(conf)
File "/home/cdesai/rtems/examples-v2/rtems_waf/rtems.py", line 158, in configure
tools = _find_tools(conf, arch, [rtems_path] + rtems_tools, tools)
TypeError: can only concatenate list (not "NoneType") to list
---
rtems_waf/rtems.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rtems_waf/rtems.py b/rtems_waf/rtems.py
index 8b312dc..59047f3 100644
--- a/rtems_waf/rtems.py
+++ b/rtems_waf/rtems.py
@@ -134,6 +134,9 @@ def configure(conf):
conf.options.rtems_archs,
conf.options.rtems_bsps)
+ if rtems_tools is None:
+ conf.fatal('RTEMS tools not found.')
+
_log_header(conf)
conf.msg('Architectures', ', '.join(archs), 'YELLOW')
More information about the vc
mailing list