Convert string to severity, with fallback
(cls, value: str)
| 51 | CRITICAL = "critical" |
| 52 | |
| 53 | @classmethod |
| 54 | def from_string(cls, value: str) -> 'VulnSeverity': |
| 55 | """Convert string to severity, with fallback""" |
| 56 | try: |
| 57 | return cls(value.lower()) |
| 58 | except ValueError: |
| 59 | return cls.INFO |
| 60 | |
| 61 |