Extend #980 with --max-quality support
This commit is contained in:
parent
5d254f776a
commit
f4d96df0f1
4 changed files with 55 additions and 5 deletions
|
@ -947,6 +947,15 @@ def shell_quote(args):
|
|||
return ' '.join(map(pipes.quote, args))
|
||||
|
||||
|
||||
def takewhile_inclusive(pred, seq):
|
||||
""" Like itertools.takewhile, but include the latest evaluated element
|
||||
(the first element so that Not pred(e)) """
|
||||
for e in seq:
|
||||
yield e
|
||||
if not pred(e):
|
||||
return
|
||||
|
||||
|
||||
def smuggle_url(url, data):
|
||||
""" Pass additional data in a URL for internal use. """
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue