From 62885c74cafd49b3ba0b1dd5442b6101782166d7 Mon Sep 17 00:00:00 2001 From: catborise Date: Sun, 8 Nov 2026 12:16:50 +0300 Subject: [PATCH] refactor(vrtManager): validate_macaddr checks the type once It tested isinstance(val, str) twice, a leftover of the Python 2 str/unicode check. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea --- vrtManager/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrtManager/util.py b/vrtManager/util.py index 0e3fbe12..84c2c24a 100644 --- a/vrtManager/util.py +++ b/vrtManager/util.py @@ -139,7 +139,7 @@ def validate_macaddr(val): if val is None: return - if not (isinstance(val, str) or isinstance(val, str)): + if not isinstance(val, str): raise ValueError("MAC address must be a string.") form = re.match("^([0-9a-fA-F]{1,2}:){5}[0-9a-fA-F]{1,2}$", val)