summaryrefslogtreecommitdiffstats
path: root/module/threads
diff options
context:
space:
mode:
Diffstat (limited to 'module/threads')
-rw-r--r--module/threads/DownloadThread.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/module/threads/DownloadThread.py b/module/threads/DownloadThread.py
index c151831a3..879dbf8bd 100644
--- a/module/threads/DownloadThread.py
+++ b/module/threads/DownloadThread.py
@@ -26,6 +26,7 @@ from pycurl import error
from module.plugins.Base import Fail, Retry
from module.plugins.Hoster import Abort, Reconnect, SkipDownload
+from module.network.HTTPRequest import BadHeader
from BaseThread import BaseThread
@@ -102,7 +103,12 @@ class DownloadThread(BaseThread):
self.log.info(_("Download restarted: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": reason})
self.queue.put(pyfile)
continue
-
+ except BadHeader, e:
+ if e.code == 500:
+ self.log.info(_("Internal Server Error"))
+ pyfile.error = _("Internal Server Error")
+ pyfile.plugin.tempOffline()
+ raise e
except Fail, e:
msg = e.args[0]
@@ -212,4 +218,4 @@ class DownloadThread(BaseThread):
def stop(self):
"""stops the thread"""
- self.put("quit") \ No newline at end of file
+ self.put("quit")