summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Pedro Algarvio <pedro@algarvio.me> 2012-02-13 13:32:14 +0100
committerGravatar Pedro Algarvio <pedro@algarvio.me> 2012-02-13 13:32:14 +0100
commit718be218273d0acd96c0b0c4739758302044daad (patch)
tree5283b0d1ae99eb735e29854c70d5a0e292622b30 /module/plugins
parentfix in unit test (diff)
downloadpyload-718be218273d0acd96c0b0c4739758302044daad.tar.xz
Don't fail miserably on hoster's internal server error.
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Hoster.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/module/plugins/Hoster.py b/module/plugins/Hoster.py
index c30fed412..9f3548350 100644
--- a/module/plugins/Hoster.py
+++ b/module/plugins/Hoster.py
@@ -161,7 +161,14 @@ class Hoster(Base):
self.pyfile.setStatus("starting")
- return self.process(self.pyfile)
+ try:
+ return self.process(self.pyfile)
+ except Exception, e:
+ # Can't seem to import BadHeader
+ if e.__class__.__name__ == 'BadHeader' and e.code == 500:
+ self.logInfo("Internal Server Error")
+ self.tempOffline()
+ raise e
def process(self, pyfile):