Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gnmi_cli_py/py_gnmicli.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _parse_path(p_names):
word_search = _RE_PATH_COMPONENT.search(word)
if not word_search: # Invalid path specified.
raise XpathError('xpath component parse error: %s' % word)
if word_search.group('key') is not None: # A path key was provided.
if word_search.group('key') != None: # A path key was provided.
tmp_key = {}
for x in re.findall(r'\[([^]]*)\]', word):
tmp_key[x.split("=")[0]] = x.split("=")[-1]
Expand Down Expand Up @@ -504,10 +504,10 @@ def subscribe_start(stub, options, req_iterator):
print('gNMI Error '+str(response.error.code)+\
' 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 != None:
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:
Expand Down