From 16b68707197e871093234923d756d1b29e5d9e1a Mon Sep 17 00:00:00 2001 From: endolith Date: Sun, 23 Aug 2026 19:45:29 -0400 Subject: [PATCH] Fix NameError in thd_analyzer when invoked as module sys was only imported under __main__, so the Windows launcher's 'from thd_analyzer import thd_analyzer' could hit NameError on the sys.exit path for empty invocations. Import sys at module scope. Co-authored-by: opencode --- scripts/thd_analyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/thd_analyzer.py b/scripts/thd_analyzer.py index ccdcaeb..cc1dc8a 100644 --- a/scripts/thd_analyzer.py +++ b/scripts/thd_analyzer.py @@ -1,3 +1,4 @@ +import sys from math import log10 from time import time @@ -34,7 +35,6 @@ def thd_analyzer(files): if __name__ == '__main__': - import sys try: files = sys.argv[1:] thd_analyzer(files)