diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/PluginThread.py | 11 | ||||
| -rw-r--r-- | module/plugins/Plugin.py | 5 | ||||
| -rw-r--r-- | module/plugins/internal/SimpleHoster.py | 4 | ||||
| -rw-r--r-- | module/plugins/internal/XFSHoster.py | 2 | 
4 files changed, 15 insertions, 7 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index 6dc6a0fe1..59d2cabc9 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -207,6 +207,9 @@ class DownloadThread(PluginThread):                  pyfile.setStatus("aborted") +                if self.m.core.debug: +                    print_exc() +                                          self.clean(pyfile)                  continue @@ -239,6 +242,9 @@ class DownloadThread(PluginThread):                      self.m.log.warning(_("Download failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg})                      pyfile.error = msg +                if self.m.core.debug: +                    print_exc() +                                          self.m.core.hookManager.downloadFailed(pyfile)                  self.clean(pyfile)                  continue @@ -380,11 +386,16 @@ class DecrypterThread(PluginThread):                  self.m.log.error(_("Decrypting failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg})                  pyfile.error = msg +            if self.m.core.debug: +                print_exc()              return          except Abort:              self.m.log.info(_("Download aborted: %s") % pyfile.name)              pyfile.setStatus("aborted") +             +            if self.m.core.debug: +                print_exc()              return          except Retry: diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 91bf3aab9..bf051a33f 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -306,7 +306,8 @@ class Plugin(Base):          while self.pyfile.waitUntil > time():              self.thread.m.reconnecting.wait(2) -            if self.pyfile.abort: raise Abort +            if self.pyfile.abort: +                raise Abort              if self.thread.m.reconnecting.isSet():                  self.waiting = False                  self.wantReconnect = False @@ -329,8 +330,6 @@ class Plugin(Base):          msg += ": " + reason.strip() if reason else ""          msg += _(" | Plugin may be out of date") -        if self.core.debug: -            print_exc()          raise Fail(msg) diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 1f673a5c2..ac90e193a 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -24,8 +24,6 @@ def _error(self, reason, type):          msg += ": " + reason.strip() if reason else ""          msg += _(" | Plugin may be out of date") -        if self.core.debug: -            print_exc()          raise Fail(msg) @@ -315,7 +313,7 @@ class SimpleHoster(Hoster):          self.req.http.c.setopt(FOLLOWLOCATION, 1) -        if parseFileInfo(self, url, html)[2] != 2: +        if parseFileInfo(self, url, html)[2] is not 2:              try:                  return re.search(r"Location\s*:\s*(.+)", self.req.http.header, re.I).group(1)              except: diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index a2e4f5846..147c4dfde 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -102,7 +102,7 @@ class XFSHoster(SimpleHoster):      def getDownloadLink(self): -        for i in xrange(5): +        for i in xrange(1, 5):              self.logDebug("Getting download link: #%d" % i)              data = self.getPostParameters()  | 
