feat(slice-1): implement tracer bullet pipeline with PyYAML check and pure-python fallback
This commit is contained in:
1 parent
937acc2548
commit
68802710b0
12 files changed
+331
-1
No files matched your search
@@ -0,0 +1,19 @@
|
||||
"""Universal homelab and fleet inventory collector and deduplicator."""
|
||||
|
||||
__version__ = "1.0.0"
|
||||
|
||||
_yaml_warning_emitted = False
|
||||
|
||||
def get_yaml_module():
|
||||
"""Return the yaml module if installed, or None while emitting an actionable warning on stderr."""
|
||||
global _yaml_warning_emitted
|
||||
try:
|
||||
import yaml
|
||||
return yaml
|
||||
except ImportError:
|
||||
import sys
|
||||
if not _yaml_warning_emitted:
|
||||
sys.stderr.write("[WARN] Moduł 'pyyaml' nie jest zainstalowany w środowisku Python. "
|
||||
"Zainstaluj go za pomocą: pip install pyyaml (lub pip install -r requirements.txt)\n")
|
||||
_yaml_warning_emitted = True
|
||||
return None
|
||||
Reference in new issue
Block a user