mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-11 09:45:41 -04:00
docs(unifi): describe import and test helper functions
This commit is contained in:
1 parent
75e427f805
commit
94164829ff
2 files changed
+2
No files matched your search
@@ -171,6 +171,7 @@ def get_entries(plugin_objects: Plugin_Objects) -> Plugin_Objects:
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
def collect_details(device_type, devices, online_macs, processed_macs, plugin_objects, device_label, device_vendor, force_import):
|
||||
"""Add eligible UniFi devices with their identity, topology, and wireless SSID to plugin results."""
|
||||
for device in devices:
|
||||
mylog('verbose', [f'{json.dumps(device)}'])
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ _stubbed_module_names = []
|
||||
|
||||
|
||||
def _stub(name: str, **attrs):
|
||||
"""Register an absent dependency stub and track it for cleanup after importing the plugin."""
|
||||
if name not in sys.modules:
|
||||
mod = types.ModuleType(name)
|
||||
for k, v in attrs.items():
|
||||
|
||||
Reference in new issue
Block a user