diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-03-15 00:58:31 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-04-13 20:56:49 (GMT) |
commit | 5092eef9eea013fb4501539ce7ff5458a309f2f4 (patch) | |
tree | 1788aa0381f5dcb07f535b0cd0ba40b0ea3856b3 | |
parent | b6fc9597f1fc0a407276e1b341bdb975d5a70161 (diff) | |
download | SCons-5092eef9eea013fb4501539ce7ff5458a309f2f4.zip SCons-5092eef9eea013fb4501539ce7ff5458a309f2f4.tar.gz SCons-5092eef9eea013fb4501539ce7ff5458a309f2f4.tar.bz2 |
Add API to see if a node has a given attribute stored in node.attributes
-rw-r--r-- | SCons/Node/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/SCons/Node/__init__.py b/SCons/Node/__init__.py index ad177a7..4e488f4 100644 --- a/SCons/Node/__init__.py +++ b/SCons/Node/__init__.py @@ -951,6 +951,11 @@ class Node(object, metaclass=NoSlotsPyPy): return False return True + def check_attributes(self, name): + """ Simple API to check if the node.attributes for name has been set""" + return getattr(getattr(self,"attributes", None), name, None) + + def alter_targets(self): """Return a list of alternate targets for this Node. """ |