X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2Fdownloader%2Fcommon.py;h=c1da065b53956eaf93400a425351dd7c1f700edc;hb=a42c9215983c4d62d1c000c9dede6e0850dbb5e4;hp=8e0e386bf185803e07b89bea3ee46c5ffb62e527;hpb=03359e9864bfb925f577fa5b16c3ef22884127aa;p=youtube-dl diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py index 8e0e386bf..c1da065b5 100644 --- a/youtube_dl/downloader/common.py +++ b/youtube_dl/downloader/common.py @@ -279,8 +279,9 @@ class FileDownloader(object): Return True on success and False otherwise """ sleep_interval = self.params.get('sleepinterval', 0) - self.to_screen(u'[download] Sleeping %d seconds...' %sleep_interval) - time.sleep(sleep_interval) + if sleep_interval > 0: + self.to_screen(u'[download] Sleeping %d seconds...' %sleep_interval) + time.sleep(sleep_interval) # Check file already present if self.params.get('continuedl', False) and os.path.isfile(encodeFilename(filename)) and not self.params.get('nopart', False): self.report_file_already_downloaded(filename) @@ -295,7 +296,7 @@ class FileDownloader(object): def real_download(self, filename, info_dict): """Real download process. Redefine in subclasses.""" - raise NotImplementedError(u'This method must be implemented by sublcasses') + raise NotImplementedError(u'This method must be implemented by subclasses') def _hook_progress(self, status): for ph in self._progress_hooks: