Remove code for unreachable cases

This commit is contained in:
Hoang Hong Quan
2024-08-05 14:41:52 +07:00
parent 90cb3d2d49
commit a3eb80d995

View File

@@ -84,12 +84,7 @@ class OCPE:
pass
else:
for device_name, device_props in self.hardware.get(device_type).items():
if "Controllers" in device_name or "Devices" in device_name:
contents.append("{}* {}:".format(" "*4, device_name))
for device_name_child, device_props_child in device_props.items():
contents.append("{}- {}".format(" "*8, device_name_child))
else:
contents.append("{}* {}{}".format(" "*4, device_name, ": {}".format(device_props) if isinstance(device_props, str) else ""))
contents.append("{}* {}{}".format(" "*4, device_name, ": {}".format(device_props) if isinstance(device_props, str) else ""))
content = "\n".join(contents) + "\n"
self.u.adjust_window_size(content)
print(content)