mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #6592 from cmonr/py3-tools-port
Updates tools to be runnable in Python 3pull/6538/merge
commit
934101ecf6
|
@ -393,7 +393,8 @@ class Config(object):
|
|||
return self.format_validation_error(error.context[0], path)
|
||||
else:
|
||||
return "in {} element {}: {}".format(
|
||||
path, str(".".join(str(p) for p in error.absolute_path)), error.message)
|
||||
path, ".".join(p for p in error.absolute_path),
|
||||
error.message.replace('u\'','\''))
|
||||
|
||||
def __init__(self, tgt, top_level_dirs=None, app_config=None):
|
||||
"""Construct a mbed configuration
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"K64F": {
|
||||
"exception_msg": "Additional properties are not allowed (u'unknown_key' was unexpected)"
|
||||
"exception_msg": "Additional properties are not allowed ('unknown_key' was unexpected)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"K64F": {
|
||||
"exception_msg": "Additional properties are not allowed (u'unknown_key' was unexpected)"
|
||||
"exception_msg": "Additional properties are not allowed ('unknown_key' was unexpected)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2113,11 +2113,13 @@ def find_tests(base_dir, target_name, toolchain_name, app_config=None):
|
|||
# Also find any COMMON paths, we'll add these later once we find all the base tests
|
||||
if 'COMMON' in relative_path_parts:
|
||||
if relative_path_parts[0] != 'COMMON':
|
||||
def predicate(base_pred, group_pred, (name, base, group, case)):
|
||||
def predicate(base_pred, group_pred, name_base_group_case):
|
||||
(name, base, group, case) = name_base_group_case
|
||||
return base == base_pred and group == group_pred
|
||||
commons.append((functools.partial(predicate, walk_base_dir, relative_path_parts[0]), d))
|
||||
else:
|
||||
def predicate(base_pred, (name, base, group, case)):
|
||||
def predicate(base_pred, name_base_group_case):
|
||||
(name, base, group, case) = name_base_group_case
|
||||
return base == base_pred
|
||||
commons.append((functools.partial(predicate, walk_base_dir), d))
|
||||
|
||||
|
|
Loading…
Reference in New Issue