Simplify a statement
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Fri, 25 Jul 2008 12:00:02 +0000 (14:00 +0200)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:23:31 +0000 (11:23 +0100)
youtube-dl

index f89c544cc6cfffbaca0fa6fdc0d631feda1dd233..7527a470442db2aca73cc9540a450b680b4983fe 100755 (executable)
@@ -179,10 +179,7 @@ class FileDownloader(object):
        def to_stdout(self, message, skip_eol=False):
                """Print message to stdout if not in quiet mode."""
                if not self._params.get('quiet', False):
-                       if skip_eol:
-                               print message,
-                       else:
-                               print message
+                       print u'%s%s' % (message, [u'\n', u''][skip_eol]),
                        sys.stdout.flush()
        
        def to_stderr(self, message):