mirror of
https://github.com/s0md3v/roop.git
synced 2025-12-06 18:08:29 +00:00
Use sys.exit() over quit()
This commit is contained in:
parent
a81e172e45
commit
542f119e04
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user