From 1c44f1c24fb7f5f535f6db71a251af95a6d1e6b6 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Tue, 30 Apr 2013 11:18:46 +1000 Subject: [PATCH] Add a get value call for macros. --- source-builder/sb/macros.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source-builder/sb/macros.py b/source-builder/sb/macros.py index e0ff0e9..1c46ec8 100644 --- a/source-builder/sb/macros.py +++ b/source-builder/sb/macros.py @@ -366,6 +366,12 @@ class macros: return None return m[1] + def get_value(self, key): + m = self.get(key) + if m is None: + return None + return m[2] + def overridden(self, key): return self.get_attribute(key) == 'override'