mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-18 19:37:45 +08:00
rtemstoolkit/macros: Convert all keys to str from unicode.
This commit is contained in:
@@ -232,6 +232,7 @@ class macros:
|
|||||||
return sorted(set(keys))
|
return sorted(set(keys))
|
||||||
|
|
||||||
def has_key(self, key):
|
def has_key(self, key):
|
||||||
|
key = self._unicode_to_str(key)
|
||||||
if type(key) is not str:
|
if type(key) is not str:
|
||||||
raise TypeError('bad key type (want str): %s' % (type(key)))
|
raise TypeError('bad key type (want str): %s' % (type(key)))
|
||||||
if self.key_filter(key) not in list(self.keys()):
|
if self.key_filter(key) not in list(self.keys()):
|
||||||
@@ -408,6 +409,7 @@ class macros:
|
|||||||
(path.host(self.expand(name))))
|
(path.host(self.expand(name))))
|
||||||
|
|
||||||
def get(self, key):
|
def get(self, key):
|
||||||
|
key = self._unicode_to_str(key)
|
||||||
if type(key) is not str:
|
if type(key) is not str:
|
||||||
raise TypeError('bad key type: %s' % (type(key)))
|
raise TypeError('bad key type: %s' % (type(key)))
|
||||||
key = self.key_filter(key)
|
key = self.key_filter(key)
|
||||||
|
Reference in New Issue
Block a user