[rtems-source-builder commit] sb: Add a defined check.
Chris Johns
chrisj at rtems.org
Fri Oct 27 06:27:06 UTC 2017
Module: rtems-source-builder
Branch: master
Commit: 9b54dd8e185291f6656fca3f38da1c38947c8dd6
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=9b54dd8e185291f6656fca3f38da1c38947c8dd6
Author: Chris Johns <chrisj at rtems.org>
Date: Fri Oct 27 17:22:12 2017 +1100
sb: Add a defined check.
Updates #3210.
---
source-builder/sb/macros.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/source-builder/sb/macros.py b/source-builder/sb/macros.py
index 2af8d36..28a52b2 100644
--- a/source-builder/sb/macros.py
+++ b/source-builder/sb/macros.py
@@ -447,6 +447,9 @@ class macros:
if key in self.macros[map]:
del self.macros[map][key]
+ def defined(self, key, globals = True, maps = None):
+ return self.get(key, globals, maps) is not None
+
def expand(self, _str):
"""Simple basic expander of config file macros."""
expanded = True
More information about the vc
mailing list