Skip to content

Commit b5b188f

Browse files
committed
ignroe if output is empty
Signed-off-by: xuliping <[email protected]>
1 parent 7032017 commit b5b188f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sonic-bgpcfgd/bgpmon/bgpmon.py

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def get_all_neigh_states(self):
8686
if rc:
8787
syslog.syslog(syslog.LOG_ERR, "*ERROR* Failed with rc:{} when execute: {}".format(rc, cmd))
8888
return
89+
if len(output) == 0:
90+
syslog.syslog(syslog.LOG_WARNING, "*WARNING* output none when execute: {}".format(cmd))
91+
return
8992

9093
peer_info = json.loads(output)
9194
# cmd ran successfully, safe to Clean the "new" set/dict for new snapshot

0 commit comments

Comments
 (0)