summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-07-29 17:05:45 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-07-29 17:05:45 +0200
commit252cf9964a2ebc78a589f75db2a7be0d25cac512 (patch)
tree0f4cd1a7949f8a3dc87eaed35f248170ee421943 /module/network
parentmany new stuff, some things already working (diff)
downloadpyload-252cf9964a2ebc78a589f75db2a7be0d25cac512.tar.xz
more improvements and cleaned some imports
Diffstat (limited to 'module/network')
-rw-r--r--module/network/FtpRequest.py3
-rwxr-xr-xmodule/network/Request.py6
2 files changed, 4 insertions, 5 deletions
diff --git a/module/network/FtpRequest.py b/module/network/FtpRequest.py
index a2f83d0fc..026d0f9fc 100644
--- a/module/network/FtpRequest.py
+++ b/module/network/FtpRequest.py
@@ -21,9 +21,8 @@
@version: v0.3.2
"""
-import base64
import time
-from os import sep, rename, stat
+from os import rename
from os.path import exists
from cStringIO import StringIO
import pycurl
diff --git a/module/network/Request.py b/module/network/Request.py
index 4649c712a..f3e399c1d 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -29,8 +29,7 @@ import urllib
from cStringIO import StringIO
import pycurl
-class AbortDownload(Exception):
- pass
+from module.plugins.Plugin import Abort
class Request:
def __init__(self, interface=None):
@@ -191,7 +190,7 @@ class Request:
self.pycurl.setopt(pycurl.COOKIELIST, "")
def add_proxy(self, protocol, adress):
- # @TODO: pycurl proxy protocoll selection
+ # @TODO: pycurl proxy protocol selection
self.pycurl.setopt(pycurl.PROXY, adress.split(":")[0])
self.pycurl.setopt(pycurl.PROXYPORT, adress.split(":")[1])
@@ -292,6 +291,7 @@ class Request:
self.addCookies()
self.fp.close()
+ if self.abort: raise Abort
free_name = self.get_free_name(folder, file_name)
move(file_temp, free_name)