Skip to content

Commit 998e0aa

Browse files
committed
rollback useless bypass
fix: os.exit -> exit
1 parent 23901ef commit 998e0aa

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

comfy_cli/cmdline.py

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

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

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

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

485483

@@ -512,10 +510,10 @@ def launch_comfyui(extra):
512510

513511
if reboot_path is None:
514512
print("[bold red]ComfyUI is not installed.[/bold red]\n")
515-
os.exit(res)
513+
exit(res)
516514

517515
if not os.path.exists(reboot_path):
518-
os.exit(res)
516+
exit(res)
519517

520518
os.remove(reboot_path)
521519
else:
@@ -560,17 +558,14 @@ def redirector_stdout():
560558

561559
if reboot_path is None:
562560
print("[bold red]ComfyUI is not installed.[/bold red]\n")
563-
# pylint: disable=protected-access
564561
os._exit(process.pid)
565562

566563
if not os.path.exists(reboot_path):
567-
# pylint: disable=protected-access
568564
os._exit(process.pid)
569565

570566
os.remove(reboot_path)
571567
except KeyboardInterrupt:
572568
if process is not None:
573-
# pylint: disable=protected-access
574569
os._exit(1)
575570

576571

0 commit comments

Comments
 (0)