Skip to content

Commit

Permalink
Fix bug in type conversion.
Browse files Browse the repository at this point in the history
We want to create the correct type of object if it's not already that
type.
  • Loading branch information
tbeadle committed Jan 25, 2023
1 parent dd6a75d commit 807eb25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etw/etw.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def _unpackSimpleType(self, record, info, event_property):

data = formatted_data.value
# Convert the formatted data if necessary
if out_type in tdh.TDH_CONVERTER_LOOKUP and type(data) == tdh.TDH_CONVERTER_LOOKUP[out_type]:
if out_type in tdh.TDH_CONVERTER_LOOKUP and type(data) != tdh.TDH_CONVERTER_LOOKUP[out_type]:
data = tdh.TDH_CONVERTER_LOOKUP[out_type](data)

return {name_field: data}
Expand Down

0 comments on commit 807eb25

Please sign in to comment.