mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
debug(contacts): Add detailed logging for contact deletion
Added logging to see exactly what meshcli returns when removing a contact. This will help diagnose why contacts are not being deleted despite returning success status.
This commit is contained in:
@@ -628,11 +628,15 @@ def delete_contact(selector: str) -> Tuple[bool, str]:
|
||||
try:
|
||||
success, stdout, stderr = _run_command(['remove_contact', selector.strip()])
|
||||
|
||||
# Log the meshcli response for debugging
|
||||
logger.info(f"remove_contact {selector}: success={success}, stdout='{stdout}', stderr='{stderr}'")
|
||||
|
||||
if success:
|
||||
message = stdout.strip() if stdout.strip() else f"Contact {selector} removed successfully"
|
||||
return True, message
|
||||
else:
|
||||
error = stderr.strip() if stderr.strip() else "Failed to remove contact"
|
||||
logger.warning(f"remove_contact failed for {selector}: {error}")
|
||||
return False, error
|
||||
|
||||
except Exception as e:
|
||||
|
||||
BIN
clients.json
Normal file
BIN
clients.json
Normal file
Binary file not shown.
Reference in New Issue
Block a user