mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Python 3.5 adjustments (#13173)
This commit is contained in:
committed by
Johann Kellerman
parent
6909be1cc7
commit
27c1806897
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user