projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use shutil.get_terminal_size for getting the terminal width if it's available (python...
[youtube-dl]
/
youtube_dl
/
options.py
diff --git
a/youtube_dl/options.py
b/youtube_dl/options.py
index 58f811162eadc27996d4c3687b297f8c96217741..a2ffe96bcfc6973ef2e31e5012e3ddbf0f63fe55 100644
(file)
--- 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,
from .downloader.external import list_external_downloaders
from .compat import (
compat_expanduser,
+ compat_get_terminal_size,
compat_getenv,
compat_kwargs,
)
from .utils import (
compat_getenv,
compat_kwargs,
)
from .utils import (
- get_term_width,
write_string,
)
from .version import __version__
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
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
max_width = columns if columns else 80
max_help_position = 80