Python 3.5 adjustments (#13173)

This commit is contained in:
Otto Winter authored and Johann Kellerman committed 2018-03-15 13:10:54 +02:00
1 parent 6909be1cc7
commit 27c1806897
6 files changed
+11 -23

No files matched your search

+6 -3
View File
@@ -95,9 +95,12 @@ def run(script_args: List) -> int:
if args.files:
print(color(C_HEAD, 'yaml files'), '(used /',
color('red', 'not used') + ')')
# Python 3.5 gets a recursive, but not in 3.4
for yfn in sorted(glob(os.path.join(config_dir, '*.yaml')) +
glob(os.path.join(config_dir, '*/*.yaml'))):
deps = os.path.join(config_dir, 'deps')
yaml_files = [f for f in glob(os.path.join(config_dir, '**/*.yaml'),
recursive=True)
if not f.startswith(deps)]
for yfn in sorted(yaml_files):
the_color = '' if yfn in res['yaml_files'] else 'red'
print(color(the_color, '-', yfn))