From 6700edaf7dd7095cce312f5b789b9d5aa246671d Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:40:38 -0800 Subject: [PATCH] Update errorlimiter.py --- sdnext_core/errorlimiter.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sdnext_core/errorlimiter.py b/sdnext_core/errorlimiter.py index b25c15197..4f2797d1c 100644 --- a/sdnext_core/errorlimiter.py +++ b/sdnext_core/errorlimiter.py @@ -1,18 +1,14 @@ -from typing import final - - class ErrorLimiterTrigger(RuntimeError): def __init__(self, name: str, *args): super().__init__(*args) self.name = name -class ErrorLimiterWarning(Exception): +class ErrorLimiterError(Exception): def __init__(self, msg: str): super().__init__(msg) -@final class ErrorLimiter: _store: dict[str, int] = {} @@ -27,4 +23,4 @@ class ErrorLimiter: if cls._store[name] <= 0: raise ErrorLimiterTrigger(name) else: - raise ErrorLimiterWarning(f"ErrorLimiter for '{name}' was called before setup") + raise ErrorLimiterError(f"ErrorLimiter for '{name}' was called before setup")