summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/PluginThread.py6
-rw-r--r--module/ThreadManager.py1
-rw-r--r--module/plugins/Plugin.py2
3 files changed, 5 insertions, 4 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index d997fcde5..f008475c5 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -29,11 +29,12 @@ from sys import exc_info, exc_clear
from types import MethodType
from os.path import join, exists
+from urllib2 import URLError
+
from module.plugins.Plugin import Abort
from module.plugins.Plugin import Fail
from module.plugins.Plugin import Reconnect
from module.plugins.Plugin import Retry
-from pycurl import error
from module.FileDatabase import PyFile
########################################################################
@@ -212,7 +213,8 @@ class DownloadThread(PluginThread):
self.clean(pyfile)
continue
- except error, e:
+ except URLError, e:
+ #@TODO determine correct error codes
try:
code, msg = e.args
except:
diff --git a/module/ThreadManager.py b/module/ThreadManager.py
index e975f52a1..bb693d695 100644
--- a/module/ThreadManager.py
+++ b/module/ThreadManager.py
@@ -25,7 +25,6 @@ from threading import Event
from time import sleep
from traceback import print_exc
from random import choice
-#import pycurl
import PluginThread
from module.network.Request import getURL
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 0406923c0..6a7ec5b14 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -337,7 +337,7 @@ class Plugin(object):
self.pyfile.download = None
newname = basename(filename)
- self.pyfile.size = self.req.dl_size
+ self.pyfile.size = d.size
if newname and newname != name:
self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname})