fix message function accepting bools and casting to string
This was allowed by accident despite what meson said would work, because in python a bool counts as a subclass of int.
This commit is contained in:
parent
7f0193e294
commit
941b8a6dbc
|
@ -91,6 +91,8 @@ def stringifyUserArguments(args, quote=False):
|
|||
return '[%s]' % ', '.join([stringifyUserArguments(x, True) for x in args])
|
||||
elif isinstance(args, dict):
|
||||
return '{%s}' % ', '.join(['{} : {}'.format(stringifyUserArguments(k, True), stringifyUserArguments(v, True)) for k, v in args.items()])
|
||||
elif isinstance(args, bool):
|
||||
pass # bools are a type of int, make this fallthrough to the error case
|
||||
elif isinstance(args, int):
|
||||
return str(args)
|
||||
elif isinstance(args, str):
|
||||
|
|
Loading…
Reference in New Issue