mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
Add no-op stderr when running as Windows GUI (#222)
This commit is contained in:
parent
6d53af247a
commit
fe7bdf9e6f
1 changed files with 6 additions and 0 deletions
6
main.py
6
main.py
|
|
@ -4,6 +4,7 @@ import multiprocessing
|
|||
import os
|
||||
import platform
|
||||
import sys
|
||||
from typing import TextIO
|
||||
|
||||
from appdirs import user_log_dir
|
||||
|
||||
|
|
@ -11,6 +12,11 @@ from appdirs import user_log_dir
|
|||
if getattr(sys, 'frozen', False) is False:
|
||||
faulthandler.enable()
|
||||
|
||||
# Sets stderr to no-op TextIO when None (run as Windows GUI).
|
||||
# Resolves https://github.com/chidiwilliams/buzz/issues/221
|
||||
if sys.stderr is None:
|
||||
sys.stderr = TextIO()
|
||||
|
||||
|
||||
# Adds the current directory to the PATH, so the ffmpeg binary get picked up:
|
||||
# https://stackoverflow.com/a/44352931/9830227
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue