redirected subprocess.Popen streams to system stdout and stderr

This commit is contained in:
K4YT3X 2020-12-13 16:53:55 -05:00
parent f4be9cc596
commit eee43def3b
8 changed files with 15 additions and 8 deletions

View File

@ -130,4 +130,4 @@ class WrapperMain:
self.print_lock.acquire()
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
self.print_lock.release()
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -13,6 +13,7 @@ Description: This class handles all FFmpeg related operations.
import json
import pathlib
import subprocess
import sys
# third-party imports
from avalon_framework import Avalon
@ -316,4 +317,4 @@ class Ffmpeg:
# turn all list elements into string to avoid errors
execute = [str(e) for e in execute]
Avalon.debug_info(f'Executing: {" ".join(execute)}')
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -12,6 +12,7 @@ Description: High-level wrapper for Gifski.
# built-in imports
import pathlib
import subprocess
import sys
# third-party imports
from avalon_framework import Avalon
@ -71,4 +72,4 @@ class Gifski:
Avalon.debug_info(f'Executing: {execute}')
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -16,6 +16,7 @@ import os
import pathlib
import platform
import subprocess
import sys
import threading
# third-party imports
@ -107,4 +108,4 @@ class WrapperMain:
self.print_lock.acquire()
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
self.print_lock.release()
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -16,6 +16,7 @@ import os
import pathlib
import platform
import subprocess
import sys
import threading
# third-party imports
@ -108,4 +109,4 @@ class WrapperMain:
self.print_lock.acquire()
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
self.print_lock.release()
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -15,6 +15,7 @@ import argparse
import os
import pathlib
import subprocess
import sys
import threading
# third-party imports
@ -116,4 +117,4 @@ class WrapperMain:
self.print_lock.acquire()
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
self.print_lock.release()
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -15,6 +15,7 @@ import argparse
import os
import pathlib
import subprocess
import sys
import threading
# third-party imports
@ -122,4 +123,4 @@ class WrapperMain:
self.print_lock.acquire()
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
self.print_lock.release()
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)

View File

@ -19,6 +19,7 @@ import os
import pathlib
import platform
import subprocess
import sys
import threading
# third-party imports
@ -111,4 +112,4 @@ class WrapperMain:
self.print_lock.acquire()
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
self.print_lock.release()
return subprocess.Popen(execute)
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)