From 0ffd62447148db73687e6919113b46b15cf16927 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 5 Apr 2026 10:38:38 +0200 Subject: [PATCH] fix: protect os.unlink in finally block from masking original exceptions --- nodes/generator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nodes/generator.py b/nodes/generator.py index f076b0f..33c5b22 100644 --- a/nodes/generator.py +++ b/nodes/generator.py @@ -50,7 +50,10 @@ class OmniVoiceGenerate: kwargs["ref_text"] = ref_text audio_tensors = model.generate(**kwargs) finally: - os.unlink(tmp_path) + try: + os.unlink(tmp_path) + except OSError: + pass elif mode == "voice_design" and instruct: kwargs["instruct"] = instruct