mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
Fix import error
This commit is contained in:
parent
4d46360fb6
commit
c8bea42f41
@ -2874,10 +2874,10 @@ def workaround_optparse_bug9161():
|
|||||||
if hasattr(shutil, 'get_terminal_size'): # Python >= 3.3
|
if hasattr(shutil, 'get_terminal_size'): # Python >= 3.3
|
||||||
compat_get_terminal_size = shutil.get_terminal_size
|
compat_get_terminal_size = shutil.get_terminal_size
|
||||||
else:
|
else:
|
||||||
from .utils import process_communicate_or_kill
|
|
||||||
_terminal_size = collections.namedtuple('terminal_size', ['columns', 'lines'])
|
_terminal_size = collections.namedtuple('terminal_size', ['columns', 'lines'])
|
||||||
|
|
||||||
def compat_get_terminal_size(fallback=(80, 24)):
|
def compat_get_terminal_size(fallback=(80, 24)):
|
||||||
|
from .utils import process_communicate_or_kill
|
||||||
columns = compat_getenv('COLUMNS')
|
columns = compat_getenv('COLUMNS')
|
||||||
if columns:
|
if columns:
|
||||||
columns = int(columns)
|
columns = int(columns)
|
||||||
|
Loading…
Reference in New Issue
Block a user