fix: resolve import paths, remove async context managers, clean up CLI
- Change absolute imports to relative imports in gnmi module - Remove async context manager methods (pygnmi is synchronous) - Remove unimplemented --depth option from CLI - Update documentation to reflect sync-only usage
This commit is contained in:
@@ -159,14 +159,6 @@ class GNMIClient:
|
||||
pass # Ignore cleanup errors
|
||||
self._client = None
|
||||
|
||||
async def __aenter__(self) -> GNMIClient:
|
||||
"""Enter async context manager."""
|
||||
return self.__enter__()
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
|
||||
"""Exit async context manager."""
|
||||
self.__exit__(exc_type, exc_val, exc_tb)
|
||||
|
||||
# =========================================================================
|
||||
# gNMI Operations
|
||||
# =========================================================================
|
||||
@@ -288,7 +280,7 @@ class GNMIClient:
|
||||
try:
|
||||
value = json.loads(value)
|
||||
except json.JSONDecodeError:
|
||||
pass # Keep as string if not valid JSON
|
||||
pass # Keep as string - not valid JSON, will be set as string value
|
||||
|
||||
try:
|
||||
if operation == "delete":
|
||||
|
||||
Reference in New Issue
Block a user