Provide guidance when called with a YouTube ID starting with a dash.

Reported at https://news.ycombinator.com/item?id=8648121
This commit is contained in:
Philipp Hagemeister 2014-11-23 10:49:19 +01:00
parent d37cab2a9d
commit 7d4111ed14
5 changed files with 41 additions and 4 deletions

View file

@ -41,6 +41,7 @@ from .compat import (
compat_urllib_parse_urlparse,
compat_urllib_request,
compat_urlparse,
shlex_quote,
)
@ -1433,3 +1434,8 @@ def ytdl_is_updateable():
from zipimport import zipimporter
return isinstance(globals().get('__loader__'), zipimporter) or hasattr(sys, 'frozen')
def args_to_str(args):
# Get a short string representation for a subprocess command
return ' '.join(shlex_quote(a) for a in args)