19 lines
472 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import sys
# В windowed-сборке (PyInstaller --noconsole) stdout/stderr могут быть None.
# Подменяем их на devnull, чтобы print() и faulthandler не падали.
if sys.stderr is None:
sys.stderr = open("NUL", "w") # noqa: SIM115
if sys.stdout is None:
sys.stdout = open("NUL", "w") # noqa: SIM115
import faulthandler
faulthandler.enable(file=sys.stderr)
from app.entry import main
if __name__ == "__main__":
main()