diff --git a/cmk/base/plugins/agent_based/utils/entity_mib.py b/cmk/base/plugins/agent_based/utils/entity_mib.py index 9f2c0a89ef3..f30a9efb783 100644 --- a/cmk/base/plugins/agent_based/utils/entity_mib.py +++ b/cmk/base/plugins/agent_based/utils/entity_mib.py @@ -24,8 +24,7 @@ class PhysicalClasses(Enum): # SUP-10602: Cisco decided to not stick to the official MiB ... @classmethod def parse_cisco(cls, raw_phys_class: str) -> "PhysicalClasses": - match raw_phys_class: - case "0" | "" | "14": - return cls.unknown - case _: - return cls(raw_phys_class) + try: + return cls(raw_phys_class) + except ValueError: + return cls.unknown