#3312 closed defect (fixed)

RSB macro calls such as define fail on unicode keys.

Reported by: Chris Johns Owned by: Chris Johns
Priority: normal Milestone: 5.1
Component: tool/rsb Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking: #3313

Description

The define call in macros.py checks for a str while the __setitem__ call can convert a unicode string to str. Remove the check.

Remove the other places in macros.py a key str check is made and see if they can be improved.

The following has been reported to me:

cd rtems-source-builder-4.11.3/rtems
../source-builder/sb-set-builder --prefix=/home/user/rtems/4.11 --log=arm.txt --without-rtems 4.11/rtems-arm
Traceback (most recent call last):
  File "../source-builder/sb-set-builder", line 29, in <module>
    setbuilder.run()
  File "../source-builder/sb/setbuilder.py", line 526, in run
    opts = options.load(sys.argv, optargs)
  File "../source-builder/sb/options.py", line 668, in load
    version.load_release_settings(o.defaults)
  File "../source-builder/sb/version.py", line 123, in load_release_settings
    sources.hash((hs[0], hash[0], hs[1]), macros, setting_error)
  File "../source-builder/sb/sources.py", line 105, in hash
    macros.define(_file, '%s %s' % (args[0], args[2]))
  File "../source-builder/sb/macros.py", line 439, in define
    raise TypeError('bad key type: %s' % (type(key)))
TypeError: bad key type: <type 'unicode'>

Change History (2)

comment:1 Changed on 02/23/18 at 01:27:27 by Chris Johns

Blocking: 3313 added

comment:2 Changed on 02/25/18 at 21:33:37 by Chris Johns <chrisj@…>

Resolution: fixed
Status: assignedclosed

In d255e81/rtems-source-builder:

sb: Convert any unicode keys to strings

Closes #3312

Note: See TracTickets for help on using tickets.