summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py1
-rw-r--r--module/remote/thriftbackend/ThriftClient.py8
2 files changed, 7 insertions, 2 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 65b02b696..0341a98e4 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -55,6 +55,7 @@ class ShareonlineBiz(Hoster):
def process(self, pyfile):
self.pyfile.url = self.pyfile.url.replace("http://www.share-online.biz/download.php?id=", "http://www.share-online.biz/dl/")
self.pyfile.url = self.pyfile.url.replace("http://share-online.biz/download.php?id=", "http://www.share-online.biz/dl/")
+ self.pyfile.url = self.pyfile.url.replace("http://share-online.biz/dl/", "http://www.share-online.biz/dl/")
self.downloadAPIData()
pyfile.name = self.api_data["filename"]
diff --git a/module/remote/thriftbackend/ThriftClient.py b/module/remote/thriftbackend/ThriftClient.py
index 67474b2bb..16bba7d1f 100644
--- a/module/remote/thriftbackend/ThriftClient.py
+++ b/module/remote/thriftbackend/ThriftClient.py
@@ -41,7 +41,7 @@ class ThriftClient:
#connection reset by peer, probably wants ssl
try:
self.createConnection(host, port, True)
- #set timeout or a ssl socket will block when query none ssl server
+ #set timeout or a ssl socket will block when querying none ssl server
self.socket.setTimeout(10)
except ImportError:
@@ -52,7 +52,7 @@ class ThriftClient:
correct = self.client.login(user, password)
finally:
self.socket.setTimeout(None)
-
+
if not correct:
self.transport.close()
raise WrongLogin
@@ -64,6 +64,8 @@ class ThriftClient:
protocol = Protocol(self.transport)
self.client = Pyload.Client(protocol)
+ def close(self):
+ self.transport.close()
def __getattr__(self, item):
return getattr(self.client, item)
@@ -81,3 +83,5 @@ if __name__ == "__main__":
data = client.getPackageData(p.pid)
print data
print "Package Name: ", data.name
+
+ client.close() \ No newline at end of file