Added minor changes (documentation) and indentation for readability.
Readme correct referencing to new docs directory its file.
couple comments and indentations to improve readability.
Added a dummy Ubuntu 22 and MacOS categories as an example.
This commit is contained in:
@@ -101,6 +101,7 @@ async def filter_targets(devices: list[dict], os_categories: dict, target_os: st
|
||||
|
||||
def get_os_variants(category: str, os_map: dict) -> set:
|
||||
"""Extracts all OS names under a given category if it exists."""
|
||||
|
||||
for key, value in os_map.items():
|
||||
if key == category:
|
||||
if isinstance(value, dict): # Expand nested categories
|
||||
@@ -124,6 +125,7 @@ async def filter_targets(devices: list[dict], os_categories: dict, target_os: st
|
||||
allowed_os = get_os_variants(target_os, os_categories[key])
|
||||
break # Stop searching once a match is found
|
||||
|
||||
# Filter out unreachable devices
|
||||
for device in devices:
|
||||
if not device["reachable"]:
|
||||
continue # Skip unreachable devices.
|
||||
|
||||
Reference in New Issue
Block a user