aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-03-05 22:19:27 +0700
committerSergey M․ <dstftw@gmail.com>2014-03-05 22:19:27 +0700
commit52d6a9a61dbb4fc6e642e340255cf2230ccbee23 (patch)
treed7be4c2d41539502fbb0f67694c10eae03b882aa /youtube_dl
parentad242b5fbc58771d4c8ffff346d0027fb0b0ba1a (diff)
Handle rtmpdump's no connection return value
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/downloader/rtmp.py5
1 files changed, 5 insertions, 0 deletions
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)