Skip to content

Commit b7f5a2d

Browse files
committed
added assertion to check object length in _convert_from_saved_type
1 parent a5b01ca commit b7f5a2d

File tree

1 file changed

+2
-2
lines changed
  • frontera/contrib/backends/remote/codecs

1 file changed

+2
-2
lines changed

frontera/contrib/backends/remote/codecs/json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def _convert_from_saved_type(obj):
4343
the second value to be the converted value. It applies the original type
4444
recursively on the object to retrieve the original form of the object.
4545
"""
46-
obj_type = obj[0]
47-
obj_value = obj[1]
46+
assert len(obj) == 2
47+
obj_type, obj_value = obj
4848
if obj_type == 'bytes':
4949
return to_bytes(obj_value)
5050
elif obj_type == 'dict':

0 commit comments

Comments
 (0)