From 76d7235f08046dfb82624f3d30d73678eef2103e Mon Sep 17 00:00:00 2001 From: Sepero Date: Tue, 30 Oct 2012 21:55:17 -0300 Subject: [PATCH] retries cannot be None, because a default was set retries cannot be None, because a default of 10 was set in add_option --- youtube_dl/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 3aa7bde12..0b223c0cb 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -441,11 +441,10 @@ def _real_main(): if numeric_limit is None: parser.error(u'invalid rate limit specified') opts.ratelimit = numeric_limit - if opts.retries is not None: - try: - opts.retries = long(opts.retries) - except (TypeError, ValueError), err: - parser.error(u'invalid retry count specified') + try: + opts.retries = long(opts.retries) + except (TypeError, ValueError), err: + parser.error(u'invalid retry count specified') try: opts.playliststart = int(opts.playliststart) if opts.playliststart <= 0: