diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-10-09 20:10:49 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-11-12 16:47:05 (GMT) |
commit | ea7b78b5eb7b3d299def7688bf7a36eaa5a14f73 (patch) | |
tree | c54f800aa026d2a80f862ddefa2f5eb40714759d /src/engine/SCons | |
parent | b7161dc0fc1284111d8f7540995b4b3c3d591e3a (diff) | |
download | SCons-ea7b78b5eb7b3d299def7688bf7a36eaa5a14f73.zip SCons-ea7b78b5eb7b3d299def7688bf7a36eaa5a14f73.tar.gz SCons-ea7b78b5eb7b3d299def7688bf7a36eaa5a14f73.tar.bz2 |
Clarify and simplify logic in Node.get_binfo()
Diffstat (limited to 'src/engine/SCons')
-rw-r--r-- | src/engine/SCons/Node/__init__.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index af98891..131953b 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -1169,13 +1169,17 @@ class Node(object, with_metaclass(NoSlotsPyPy)): binfo.bsources = [s for s in sources if s not in seen and not seen.add(s)] binfo.bsourcesigs = [s.get_ninfo() for s in binfo.bsources] - binfo.bdepends = [d for d in self.depends if d not in ignore_set] binfo.bdependsigs = [d.get_ninfo() for d in self.depends] - binfo.bimplicit = [i for i in self.implicit or [] if i not in ignore_set] - binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit] - + # Because self.implicit is initialized to None (and not empty list []) + # we have to handle this case + if not self.implicit: + binfo.bimplicit = [] + binfo.bimplicitsigs = [] + else: + binfo.bimplicit = [i for i in self.implicit if i not in ignore_set] + binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit] return binfo |