19 lines
472 B
Python
19 lines
472 B
Python
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()
|