Skip to content
Snippets Groups Projects
Commit 67bb7339 authored by Jameson Rollins's avatar Jameson Rollins
Browse files

struct: fix translation of sub-structs in to_dict() method

was not matching some derived classes
parent c3e8c1db
No related branches found
No related tags found
No related merge requests found
......@@ -174,7 +174,7 @@ class Struct(object):
"""
d = {}
for k,v in self.__dict__.items():
if isinstance(v, type(self)):
if isinstance(v, Struct):
d[k] = v.to_dict(array=array)
else:
if isinstance(v, list):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment