Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated attempts to build will fail noisily #69

Closed
BrianGraysonSiV opened this issue Jun 17, 2020 · 1 comment
Closed

Repeated attempts to build will fail noisily #69

BrianGraysonSiV opened this issue Jun 17, 2020 · 1 comment

Comments

@BrianGraysonSiV
Copy link

BrianGraysonSiV commented Jun 17, 2020

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
Copy link
Collaborator

Thanks Brian and sorry for the slow response. Applied your fix via pull request 74.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants