cli: do not print extra blank line when noprogress passed
This commit is contained in:
parent
26bd419054
commit
5df1e3e6e6
2 changed files with 2 additions and 2 deletions
|
|
@ -491,7 +491,7 @@ def download_file(url, relpath, quiet=False, noprogress=False, size=None, num=No
|
|||
c.setopt(c.XFERINFOFUNCTION, _download_progress)
|
||||
c.perform()
|
||||
c.close()
|
||||
if not quiet:
|
||||
if not (quiet or noprogress):
|
||||
print('')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class TestDownloadFile(unittest.TestCase):
|
|||
self.reset_mock()
|
||||
download_file("http://url", self.filename, quiet=False, noprogress=True)
|
||||
actual = self.stdout.getvalue()
|
||||
expected = 'Downloading: %s\n\n' % self.filename
|
||||
expected = 'Downloading: %s\n' % self.filename
|
||||
self.assertMultiLineEqual(actual, expected)
|
||||
self.assertEqual(self.curl.setopt.call_count, 3)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue