From: Sergey M․ Date: Wed, 5 Mar 2014 15:19:27 +0000 (+0700) Subject: Handle rtmpdump's no connection return value X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=52d6a9a61dbb4fc6e642e340255cf2230ccbee23;p=youtube-dl.git Handle rtmpdump's no connection return value --- diff --git a/youtube_dl/downloader/rtmp.py b/youtube_dl/downloader/rtmp.py index 67461f160..034875ab7 100644 --- a/youtube_dl/downloader/rtmp.py +++ b/youtube_dl/downloader/rtmp.py @@ -155,9 +155,14 @@ class RtmpFD(FileDownloader): RD_SUCCESS = 0 RD_FAILED = 1 RD_INCOMPLETE = 2 + RD_NO_CONNECT = 3 retval = run_rtmpdump(args) + if retval == RD_NO_CONNECT: + self.to_screen(u'[rtmpdump] Could not connect to RTMP server.') + return False + while (retval == RD_INCOMPLETE or retval == RD_FAILED) and not test: prevsize = os.path.getsize(encodeFilename(tmpfilename)) self.to_screen(u'[rtmpdump] %s bytes' % prevsize)