Extend #980 with --max-quality support

This commit is contained in:
Philipp Hagemeister 2013-10-18 00:46:35 +02:00
parent 5d254f776a
commit f4d96df0f1
4 changed files with 55 additions and 5 deletions

View file

@ -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. """