mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-22 10:18:09 +02:00
Fix so-yaml get to output booleans in YAML format and add bool test
This commit is contained in:
@@ -346,7 +346,9 @@ def get(args):
|
||||
print(f"Key '{key}' not found by so-yaml.py", file=sys.stderr)
|
||||
return 2
|
||||
|
||||
if isinstance(output, (dict, list)):
|
||||
if isinstance(output, bool):
|
||||
print(str(output).lower())
|
||||
elif isinstance(output, (dict, list)):
|
||||
print(yaml.safe_dump(output).strip())
|
||||
else:
|
||||
print(output)
|
||||
|
||||
Reference in New Issue
Block a user