diff --git a/src/wrappers/anime4kcpp.py b/src/wrappers/anime4kcpp.py index e66f0eb..c8531b9 100755 --- a/src/wrappers/anime4kcpp.py +++ b/src/wrappers/anime4kcpp.py @@ -15,7 +15,6 @@ import argparse import os import pathlib import platform -import shlex import subprocess import threading @@ -129,6 +128,6 @@ class WrapperMain: # return the Popen object of the new process created self.print_lock.acquire() - Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {shlex.join(execute)}') + Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}') self.print_lock.release() return subprocess.Popen(execute) diff --git a/src/wrappers/ffmpeg.py b/src/wrappers/ffmpeg.py index 87eb06c..3f19573 100755 --- a/src/wrappers/ffmpeg.py +++ b/src/wrappers/ffmpeg.py @@ -12,7 +12,6 @@ Description: This class handles all FFmpeg related operations. # built-in imports import json import pathlib -import shlex import subprocess # third-party imports @@ -58,7 +57,7 @@ class Ffmpeg: # turn elements into str execute = [str(e) for e in execute] - Avalon.debug_info(f'Executing: {shlex.join(execute)}') + Avalon.debug_info(f'Executing: {" ".join(execute)}') # initialize dictionary to store pixel formats pixel_formats = {} @@ -66,7 +65,7 @@ class Ffmpeg: # record all pixel formats into dictionary for line in subprocess.run(execute, check=True, stdout=subprocess.PIPE).stdout.decode().split('\n'): try: - pixel_formats[' '.join(line.split()).split()[1]] = int(' '.join(line.split()).split()[3]) + pixel_formats[" ".join(line.split()).split()[1]] = int(" ".join(line.split()).split()[3]) except (IndexError, ValueError): pass @@ -103,7 +102,7 @@ class Ffmpeg: # turn elements into str execute = [str(e) for e in execute] - Avalon.debug_info(f'Executing: {shlex.join(execute)}') + Avalon.debug_info(f'Executing: {" ".join(execute)}') return int(subprocess.run(execute, check=True, stdout=subprocess.PIPE).stdout.decode().strip()) def probe_file_info(self, input_video): @@ -136,7 +135,7 @@ class Ffmpeg: # turn elements into str execute = [str(e) for e in execute] - Avalon.debug_info(f'Executing: {shlex.join(execute)}') + Avalon.debug_info(f'Executing: {" ".join(execute)}') json_str = subprocess.run(execute, check=True, stdout=subprocess.PIPE).stdout return json.loads(json_str.decode('utf-8')) @@ -316,5 +315,5 @@ class Ffmpeg: def _execute(self, execute): # turn all list elements into string to avoid errors execute = [str(e) for e in execute] - Avalon.debug_info(f'Executing: {shlex.join(execute)}') + Avalon.debug_info(f'Executing: {" ".join(execute)}') return subprocess.Popen(execute) diff --git a/src/wrappers/realsr_ncnn_vulkan.py b/src/wrappers/realsr_ncnn_vulkan.py index 61aa34a..4b961a7 100755 --- a/src/wrappers/realsr_ncnn_vulkan.py +++ b/src/wrappers/realsr_ncnn_vulkan.py @@ -15,7 +15,6 @@ import argparse import os import pathlib import platform -import shlex import subprocess import threading @@ -104,6 +103,6 @@ class WrapperMain: # return the Popen object of the new process created self.print_lock.acquire() - Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {shlex.join(execute)}') + Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}') self.print_lock.release() return subprocess.Popen(execute) diff --git a/src/wrappers/srmd_ncnn_vulkan.py b/src/wrappers/srmd_ncnn_vulkan.py index 437e305..8b27bdf 100755 --- a/src/wrappers/srmd_ncnn_vulkan.py +++ b/src/wrappers/srmd_ncnn_vulkan.py @@ -15,7 +15,6 @@ import argparse import os import pathlib import platform -import shlex import subprocess import threading @@ -105,6 +104,6 @@ class WrapperMain: # return the Popen object of the new process created self.print_lock.acquire() - Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {shlex.join(execute)}') + Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}') self.print_lock.release() return subprocess.Popen(execute) diff --git a/src/wrappers/waifu2x_caffe.py b/src/wrappers/waifu2x_caffe.py index e4677a1..8a6aad1 100755 --- a/src/wrappers/waifu2x_caffe.py +++ b/src/wrappers/waifu2x_caffe.py @@ -14,7 +14,6 @@ for waifu2x-caffe. import argparse import os import pathlib -import shlex import subprocess import threading @@ -108,6 +107,6 @@ class WrapperMain: # return the Popen object of the new process created self.print_lock.acquire() - Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {shlex.join(execute)}') + Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}') self.print_lock.release() return subprocess.Popen(execute) diff --git a/src/wrappers/waifu2x_converter_cpp.py b/src/wrappers/waifu2x_converter_cpp.py index b545c23..c1d4a7b 100755 --- a/src/wrappers/waifu2x_converter_cpp.py +++ b/src/wrappers/waifu2x_converter_cpp.py @@ -14,7 +14,6 @@ for waifu2x-converter-cpp. import argparse import os import pathlib -import shlex import subprocess import threading @@ -121,6 +120,6 @@ class WrapperMain: # return the Popen object of the new process created self.print_lock.acquire() - Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {shlex.join(execute)}') + Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}') self.print_lock.release() return subprocess.Popen(execute) diff --git a/src/wrappers/waifu2x_ncnn_vulkan.py b/src/wrappers/waifu2x_ncnn_vulkan.py index e89c40e..0d72789 100755 --- a/src/wrappers/waifu2x_ncnn_vulkan.py +++ b/src/wrappers/waifu2x_ncnn_vulkan.py @@ -18,7 +18,6 @@ import argparse import os import pathlib import platform -import shlex import subprocess import threading @@ -108,6 +107,6 @@ class WrapperMain: # return the Popen object of the new process created self.print_lock.acquire() - Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {shlex.join(execute)}') + Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}') self.print_lock.release() return subprocess.Popen(execute)