mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Added custom port support for ftp access
This commit is contained in:
parent
2e459cafe2
commit
0c3bace49e
@ -10,9 +10,10 @@ from handlers.handle_config import configurationValues
|
|||||||
|
|
||||||
def createFTPConnection():
|
def createFTPConnection():
|
||||||
configValues = configurationValues()
|
configValues = configurationValues()
|
||||||
ftp = ftplib.FTP(configValues.sftp_server, user=configValues.sftp_user, \
|
|
||||||
passwd=configValues.sftp_password)
|
|
||||||
try:
|
try:
|
||||||
|
ftp = ftplib.FTP()
|
||||||
|
ftp.connect(configValues.sftp_server, configValues.sftp_port)
|
||||||
|
ftp.login(configValues.sftp_user, configValues.sftp_password)
|
||||||
return ftp
|
return ftp
|
||||||
except UnboundLocalError:
|
except UnboundLocalError:
|
||||||
print(oColors.brightRed + "[FTP]: Check your config.ini!" + oColors.standardWhite)
|
print(oColors.brightRed + "[FTP]: Check your config.ini!" + oColors.standardWhite)
|
||||||
|
Loading…
Reference in New Issue
Block a user