Skip to content

Commit

Permalink
Refactored Redis store (#4865)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Apr 8, 2024
1 parent 3c403b3 commit 114b9c8
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 292 deletions.
14 changes: 5 additions & 9 deletions plaso/serializer/json_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,12 @@ def ReadSerializedDict(cls, json_dict):

json_object = cls._ConvertJSONToValue(json_dict)

if isinstance(json_object, dfdatetime_interface.DateTimeValues):
return json_object

if isinstance(json_object, dfvfs_path_spec.PathSpec):
return json_object

if not isinstance(json_object, containers_interface.AttributeContainer):
if not isinstance(json_object, (
containers_interface.AttributeContainer,
dfdatetime_interface.DateTimeValues,
dfvfs_path_spec.PathSpec)):
json_object_type = type(json_object)
raise TypeError(
f'{json_object_type!s} is not an attribute container type.')
raise TypeError(f'{json_object_type!s} is not a supported type.')

return json_object

Expand Down

0 comments on commit 114b9c8

Please sign in to comment.