Skip to content

Commit b8b2782

Browse files
committed
Code changes to ignore warnings in stdout.
1 parent 8527ffd commit b8b2782

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

plugins/connection/ssh_netscaler_adc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ def wrapped(self, *args, **kwargs):
403403
warning_regex = r"Warning: \[[\s\S]*?\]\s*"
404404
stdout = re.sub(warning_regex, "", stdout, 0, re.UNICODE)
405405

406+
# Remove RPC node password warnings that contaminate stdout
407+
rpc_warning_regex = r"Warning: One or more RPC nodes are configured with default passwords[^\r\n]*"
408+
stdout = re.sub(rpc_warning_regex, "", stdout, 0, re.UNICODE)
409+
406410
# Remove leading "]" characters that might remain
407411
stdout = re.sub(r"^\]\s*", "", stdout, re.MULTILINE)
408412

0 commit comments

Comments
 (0)