Skip to content

Commit 2757e9a

Browse files
authored
Merge pull request #12275 from micque01/tools-fix-call-to-sorted
Fix call to sorted by providing key to sort on.
2 parents b7be277 + ce0d611 commit 2757e9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/config/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ def __init__(self, tgt, top_level_dirs=None, app_config=None):
511511
resolver = RefResolver(uri, schema)
512512
validator = Draft4Validator(schema, resolver=resolver)
513513

514-
errors = sorted(validator.iter_errors(self.app_config_data))
514+
errors = sorted(
515+
validator.iter_errors(self.app_config_data), key=str
516+
)
515517

516518
if errors:
517519
raise ConfigException("; ".join(
@@ -583,7 +585,7 @@ def add_config_files(self, flist):
583585
resolver = RefResolver(uri, schema_file)
584586
validator = Draft4Validator(schema_file, resolver=resolver)
585587

586-
errors = sorted(validator.iter_errors(cfg))
588+
errors = sorted(validator.iter_errors(cfg), key=str)
587589

588590
if errors:
589591
raise ConfigException("; ".join(

0 commit comments

Comments
 (0)