diff options
author | Jesús <heckyel@hyperbola.info> | 2021-10-20 11:45:20 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-10-20 11:45:20 -0500 |
commit | c7afb25e19a91493db6069d1db9f7d1bc8491dc1 (patch) | |
tree | d4f4d0a125e191585af49dcfb189d2f1ba9acf17 /yt_dlp/YoutubeDL.py | |
parent | 000d2844fd93d8c35fc74d22588291e7c7d742fa (diff) | |
parent | d3c93ec2b7f5bcb872b0afb169efaa2f1abdf6e2 (diff) | |
download | hypervideo-pre-c7afb25e19a91493db6069d1db9f7d1bc8491dc1.tar.lz hypervideo-pre-c7afb25e19a91493db6069d1db9f7d1bc8491dc1.tar.xz hypervideo-pre-c7afb25e19a91493db6069d1db9f7d1bc8491dc1.zip |
updated from upstream | 20/10/2021 at 11:45
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 18ab19e09..d1ab540d2 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -87,10 +87,10 @@ from .utils import ( parse_filesize, PerRequestProxyHandler, platform_name, + Popen, PostProcessingError, preferredencoding, prepend_extension, - process_communicate_or_kill, register_socks_protocols, RejectedVideoReached, render_table, @@ -577,12 +577,9 @@ class YoutubeDL(object): stdout=slave, stderr=self._err_file) try: - self._output_process = subprocess.Popen( - ['bidiv'] + width_args, **sp_kwargs - ) + self._output_process = Popen(['bidiv'] + width_args, **sp_kwargs) except OSError: - self._output_process = subprocess.Popen( - ['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs) + self._output_process = Popen(['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs) self._output_channel = os.fdopen(master, 'rb') except OSError as ose: if ose.errno == errno.ENOENT: @@ -3278,11 +3275,11 @@ class YoutubeDL(object): if self.params.get('compat_opts'): write_debug('Compatibility options: %s\n' % ', '.join(self.params.get('compat_opts'))) try: - sp = subprocess.Popen( + sp = Popen( ['git', 'rev-parse', '--short', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=os.path.dirname(os.path.abspath(__file__))) - out, err = process_communicate_or_kill(sp) + out, err = sp.communicate_or_kill() out = out.decode().strip() if re.match('[0-9a-f]+', out): write_debug('Git HEAD: %s\n' % out) |