Repeated attempts to build will fail noisily
BrianGraysonSiV opened this issue · 1 comments
BrianGraysonSiV commented
Invoking ./build_all.py --arch native --chip default --board default
, and then re-invoking it, will cause it to die with messages like this:
AttributeError: 'NoneType' object has no attribute 'stdout'
The reason is that if all files are up to date, the 'res' object is still None.
A quick fix is to indent the 'res' lines, and the preceding "if not succeeded" lines, as shown here:
diff --git a/build_all.py b/build_all.py
index 8bc38be..2b1263d 100755
--- a/build_all.py
+++ b/build_all.py
@@ -483,12 +483,12 @@ def compile_file(f_root, srcdir, bindir, suffix='.c'):
)
succeeded = False
- if not succeeded:
- log.debug('Command was:')
- log.debug(arglist_to_str(arglist))
+ if not succeeded:
+ log.debug('Command was:')
+ log.debug(arglist_to_str(arglist))
- log.debug(res.stdout.decode('utf-8'))
- log.debug(res.stderr.decode('utf-8'))
+ log.debug(res.stdout.decode('utf-8'))
+ log.debug(res.stderr.decode('utf-8'))
return succeeded
jeremybennett commented
Thanks Brian and sorry for the slow response. Applied your fix via pull request 74.