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
4 changes: 2 additions & 2 deletions gnmi_cli_py/py_gnmicli.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
_RE_PATH_COMPONENT = re.compile(r'''
^
(?P<pname>[^[]+) # gNMI path name
(\[(?P<key>\w+) # gNMI path key
(\[(?P<key>[a-zA-Z0-9\-]+) # gNMI path key
=
(?P<value>.*) # gNMI path value
\])?$
Expand Down Expand Up @@ -248,7 +248,7 @@ def _get_val(json_value):
json_value.strip('@'), 'rb').read())
except (IOError, ValueError) as e:
raise JsonReadError('Error while loading JSON: %s' % str(e))
val.json_ietf_val = json.dumps(set_json)
val.json_ietf_val = json.dumps(set_json).encode('utf-8')
return val
coerced_val = _format_type(json_value)
type_to_value = {bool: 'bool_val', int: 'int_val', float: 'float_val',
Expand Down