From 807eb25f494d1a3fe0666e9ebe6dc94ecc8abb4a Mon Sep 17 00:00:00 2001 From: Tommy Beadle Date: Wed, 25 Jan 2023 14:24:01 -0500 Subject: [PATCH] Fix bug in type conversion. We want to create the correct type of object if it's not already that type. --- etw/etw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etw/etw.py b/etw/etw.py index 4d639d7..6af2e7c 100644 --- a/etw/etw.py +++ b/etw/etw.py @@ -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}