From 33613e926c8c452fb1d52cce22da97a06fb33d9b Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 30 Sep 2021 06:15:03 -0400 Subject: [PATCH] fix: resolve parser class names for kaitai specs with underscores --- src/hobbits-plugins/analyzers/KaitaiStruct/scripts/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hobbits-plugins/analyzers/KaitaiStruct/scripts/runner.py b/src/hobbits-plugins/analyzers/KaitaiStruct/scripts/runner.py index f6b8a15d..c1b642aa 100644 --- a/src/hobbits-plugins/analyzers/KaitaiStruct/scripts/runner.py +++ b/src/hobbits-plugins/analyzers/KaitaiStruct/scripts/runner.py @@ -154,7 +154,7 @@ def parse_data(input_filename, output_filename, action_progress): module_file = os.path.basename(scripts[0]) sys.path.append(os.path.dirname(scripts[0])) package_name = os.path.splitext(module_file)[0] - class_name = package_name.capitalize() + class_name = "".join([s.capitalize() for s in package_name.split("_")]) try: del sys.modules[package_name] except KeyError: