summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/Ftp.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/Ftp.py')
-rw-r--r--module/plugins/hoster/Ftp.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py
index 4183f9b3c..6924c5910 100644
--- a/module/plugins/hoster/Ftp.py
+++ b/module/plugins/hoster/Ftp.py
@@ -12,7 +12,7 @@ from pyload.plugin.Hoster import Hoster
class Ftp(Hoster):
__name__ = "Ftp"
__type__ = "hoster"
- __version__ = "0.43"
+ __version__ = "0.46"
__pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+'
@@ -43,12 +43,11 @@ class Ftp(Hoster):
if netloc in servers:
self.logDebug("Logging on to %s" % netloc)
- self.req.addAuth(self.account.accounts[netloc]['password'])
+ self.req.addAuth(self.account.getAccountInfo(netloc)['password'])
else:
- for pwd in self.getPassword().splitlines():
- if ":" in pwd:
- self.req.addAuth(pwd.strip())
- break
+ pwd = self.getPassword()
+ if ':' in pwd:
+ self.req.addAuth(pwd)
self.req.http.c.setopt(pycurl.NOBODY, 1)