Use sys.exit() over quit()

This commit is contained in:
henryruhs 2023-07-04 22:00:50 +02:00
parent a81e172e45
commit 542f119e04
3 changed files with 5 additions and 3 deletions

View File

@ -200,7 +200,7 @@ def start() -> None:
def destroy() -> None:
if roop.globals.target_path:
clean_temp(roop.globals.target_path)
quit()
sys.exit()
def run() -> None:

View File

@ -1,4 +1,5 @@
import os
import sys
import importlib
import psutil
from concurrent.futures import ThreadPoolExecutor, as_completed
@ -28,7 +29,7 @@ def load_frame_processor_module(frame_processor: str) -> Any:
if not hasattr(frame_processor_module, method_name):
raise NotImplementedError
except (ImportError, NotImplementedError):
quit(f'Frame processor {frame_processor} crashed.')
sys.exit(f'Frame processor {frame_processor} crashed.')
return frame_processor_module

View File

@ -1,4 +1,5 @@
import os
import sys
import webbrowser
import customtkinter as ctk
from typing import Callable, Tuple
@ -222,7 +223,7 @@ def update_preview(frame_number: int = 0) -> None:
if roop.globals.source_path and roop.globals.target_path:
temp_frame = get_video_frame(roop.globals.target_path, frame_number)
if predict_frame(temp_frame):
quit()
sys.exit()
source_face = get_one_face(cv2.imread(roop.globals.source_path))
if not get_face_reference():
reference_face = get_one_face(temp_frame, roop.globals.face_position)