Skip to content

Commit

Permalink
Bug: Don't print error for known notification.
Browse files Browse the repository at this point in the history
  • Loading branch information
krihal committed Sep 5, 2024
1 parent 01ffeed commit 7a61b85
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions clixon/netconf.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import sys
from enum import Enum
from typing import Optional
from xml.sax._exceptions import SAXParseException

from clixon.args import get_logger
from clixon.element import Element
from clixon.parser import parse_string
from clixon.args import get_logger

import sys

logger = get_logger()

Expand Down Expand Up @@ -257,7 +256,10 @@ def rpc_error_get(xmlstr: str, standalone: Optional[bool] = False) -> None:

logger.error(message)
except AttributeError:
logger.error(f"Unknown notification error: {xmlstr}")
if "SUCCESS" in xmlstr:
pass
else:
logger.error(f"Unknown notification error: {xmlstr}")
elif "error-message" in xmlstr:
try:
message = str(root.rpc_reply.rpc_error.error_message.cdata)
Expand Down

0 comments on commit 7a61b85

Please sign in to comment.