Skip to content

Commit

Permalink
Merge pull request #59 from Krutyi-4el/remove-redirect
Browse files Browse the repository at this point in the history
remove unnecessary output redirect
  • Loading branch information
solaluset authored Jun 23, 2023
2 parents 2bff430 + 452df8e commit 4d8224d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions musicbot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from enum import Enum
from threading import Thread
from subprocess import DEVNULL, check_call
from multiprocessing import parent_process
from typing import TYPE_CHECKING, Callable, Awaitable, Optional, Union

from discord import (
Expand Down Expand Up @@ -199,13 +198,8 @@ class OutputWrapper:
log_file = None

def __init__(self, stream):
if parent_process() is None:
self.using_log_file = False
self.stream = stream
else:
# use log file if not in main process
self.using_log_file = True
self.stream = self.get_log_file()
self.using_log_file = False
self.stream = stream

def write(self, text, /):
try:
Expand Down

0 comments on commit 4d8224d

Please sign in to comment.