aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/options.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-02-28 21:42:16 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-02-28 21:44:57 +0100
commit003c69a84b68cadb46aeb8e03115848a722fd675 (patch)
treec562f029a2868fc1f8efa3753f8acedcd0583a97 /youtube_dl/options.py
parent01349011088b10861e283c245f5da56aa3d5fba0 (diff)
Use shutil.get_terminal_size for getting the terminal width if it's available (python >= 3.3)
Diffstat (limited to 'youtube_dl/options.py')
-rw-r--r--youtube_dl/options.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 58f811162..a2ffe96bc 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -8,11 +8,11 @@ import sys
from .downloader.external import list_external_downloaders
from .compat import (
compat_expanduser,
+ compat_get_terminal_size,
compat_getenv,
compat_kwargs,
)
from .utils import (
- get_term_width,
write_string,
)
from .version import __version__
@@ -100,7 +100,7 @@ def parseOpts(overrideArguments=None):
return opts
# No need to wrap help messages if we're on a wide console
- columns = get_term_width()
+ columns = compat_get_terminal_size().columns
max_width = columns if columns else 80
max_help_position = 80