From 5491ddc91ac49588a59fc12f75d092598b041966 Mon Sep 17 00:00:00 2001 From: lcdr Date: Sun, 7 Mar 2021 16:24:57 +0100 Subject: [PATCH] Handle inconsistencies in config format more gracefully --- utils/luzviewer.pyw | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/luzviewer.pyw b/utils/luzviewer.pyw index 2c8509e..cc95549 100644 --- a/utils/luzviewer.pyw +++ b/utils/luzviewer.pyw @@ -232,8 +232,13 @@ class LUZViewer(viewer.Viewer): for _ in range(stream.read(c_uint)): config_name = stream.read(str, length_type=c_ubyte) config_type_and_value = stream.read(str, length_type=c_ubyte) - config_type, config_value = config_type_and_value.split(":", maxsplit=1) - config_type = LnvType(int(config_type)).name + if ":" in config_type_and_value: + config_type, config_value = config_type_and_value.split(":", maxsplit=1) + config_type = LnvType(int(config_type)).name + else: + print(config_type_and_value) + config_type = config_type_and_value + config_value = config_type_and_value self.tree.insert(waypoint, END, text="Config", values=(config_name, config_type, config_value)) def _parse_lvl(self, stream, scene):