Skip to content

Commit 23901ef

Browse files
committed
pylint directive to bypass os._exit
1 parent d88f790 commit 23901ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

comfy_cli/cmdline.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ def msg_hook(stream):
412412
ConfigManager().write_config()
413413

414414
# NOTE: os.exit(0) doesn't work.
415+
# pylint: disable=protected-access
415416
os._exit(0)
416417

417418
with logging_lock:
@@ -478,6 +479,7 @@ def background_launch(extra):
478479

479480
console.print(f"\n[bold red]Execution error: failed to launch ComfyUI[/bold red]\n")
480481
# NOTE: os.exit(0) doesn't work
482+
# pylint: disable=protected-access
481483
os._exit(1)
482484

483485

@@ -528,8 +530,8 @@ def redirector_stdout():
528530
if process is not None:
529531
print(process.stdout.readline(), end="")
530532

531-
t1 = threading.Thread(target=redirector_stderr).start()
532-
t2 = threading.Thread(target=redirector_stdout).start()
533+
threading.Thread(target=redirector_stderr).start()
534+
threading.Thread(target=redirector_stdout).start()
533535

534536
try:
535537
while True:
@@ -558,14 +560,17 @@ def redirector_stdout():
558560

559561
if reboot_path is None:
560562
print("[bold red]ComfyUI is not installed.[/bold red]\n")
563+
# pylint: disable=protected-access
561564
os._exit(process.pid)
562565

563566
if not os.path.exists(reboot_path):
567+
# pylint: disable=protected-access
564568
os._exit(process.pid)
565569

566570
os.remove(reboot_path)
567571
except KeyboardInterrupt:
568572
if process is not None:
573+
# pylint: disable=protected-access
569574
os._exit(1)
570575

571576

0 commit comments

Comments
 (0)