Changeset d255e81 in rtems-source-builder


Ignore:
Timestamp:
Feb 23, 2018, 1:58:28 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
5, master
Children:
4b3e0f8
Parents:
d30be31
git-author:
Chris Johns <chrisj@…> (02/23/18 01:58:28)
git-committer:
Chris Johns <chrisj@…> (02/23/18 02:04:35)
Message:

sb: Convert any unicode keys to strings

Closes #3312

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/macros.py

    rd30be31 rd255e81  
    151151        key = self._unicode_to_str(key)
    152152        if type(key) is not str:
    153             raise TypeError('bad key type (want str): %s' % (type(key)))
     153            raise TypeError('bad key type (want str): %s (%s)' % (type(key), key))
    154154        if type(value) is not tuple:
    155155            value = self._unicode_to_str(value)
     
    397397
    398398    def get(self, key, globals = True, maps = None):
     399        key = self._unicode_to_str(key)
    399400        if type(key) is not str:
    400401            raise TypeError('bad key type: %s' % (type(key)))
     
    436437
    437438    def define(self, key, value = '1'):
    438         if type(key) is not str:
    439             raise TypeError('bad key type: %s' % (type(key)))
    440439        self.__setitem__(key, ('none', 'none', value))
    441440
    442441    def undefine(self, key):
     442        key = self._unicode_to_str(key)
    443443        if type(key) is not str:
    444444            raise TypeError('bad key type: %s' % (type(key)))
Note: See TracChangeset for help on using the changeset viewer.