From de7193b1db33a859cf3b154a60500f0509afa86d Mon Sep 17 00:00:00 2001 From: Zain Budhwani Date: Tue, 31 Dec 2024 21:54:56 +0000 Subject: [PATCH] Make changes to be compatible with python3 --- gnmi_cli_py/py_gnmicli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnmi_cli_py/py_gnmicli.py b/gnmi_cli_py/py_gnmicli.py index 0ea6f3d5..1bd493bc 100644 --- a/gnmi_cli_py/py_gnmicli.py +++ b/gnmi_cli_py/py_gnmicli.py @@ -230,7 +230,7 @@ def _path_names(xpath): end += 1 if insideBrackets: - print("missing ] in path string: %s" % xpath) + print("missing ] in path string: {}".format(xpath)) return [] return path @@ -505,9 +505,9 @@ def subscribe_start(stub, options, req_iterator): ' received\n'+str(response.error.message) + str(response.error)) elif response.HasField('update'): if filter_event_regex is not None: - if filter_event_regex is not "": + if filter_event_regex != "": match = check_event_response(response, filter_event_regex) - if len(match) is not 0: + if len(match) != 0: print(response) update_count = update_count + 1 else: