mirror of
https://github.com/lcdr/utils.git
synced 2024-08-30 17:32:16 +00:00
Handle inconsistencies in config format more gracefully
This commit is contained in:
parent
ab9d613f2f
commit
5491ddc91a
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user