summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-06-11 08:37:25 +1000
committerChris Johns <chrisj@rtems.org>2019-06-11 08:37:25 +1000
commitcbff4c8ca2b8f9a207e8538decae06ea81dbc2b1 (patch)
treef0407d417b2ab56dfb9b2bb389c07be5c0850736
parentb7b19f42546b81fc691333b57659b7861c97dc6d (diff)
rtemstoolkit/macros: Convert all keys to str from unicode.
-rw-r--r--rtemstoolkit/macros.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rtemstoolkit/macros.py b/rtemstoolkit/macros.py
index e3776bd..d6a3563 100644
--- a/rtemstoolkit/macros.py
+++ b/rtemstoolkit/macros.py
@@ -232,6 +232,7 @@ class macros:
return sorted(set(keys))
def has_key(self, key):
+ key = self._unicode_to_str(key)
if type(key) is not str:
raise TypeError('bad key type (want str): %s' % (type(key)))
if self.key_filter(key) not in list(self.keys()):
@@ -408,6 +409,7 @@ class macros:
(path.host(self.expand(name))))
def get(self, key):
+ key = self._unicode_to_str(key)
if type(key) is not str:
raise TypeError('bad key type: %s' % (type(key)))
key = self.key_filter(key)