Apply suggestions from code review

Co-authored-by: Neocky <Neocky@users.noreply.github.com>
This commit is contained in:
TheDudeFromCI 2021-08-04 19:52:10 -07:00 committed by GitHub
parent 9289872831
commit 1c74d8501c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -72,8 +72,10 @@ def createConfig():
config['SFTP - Remote Server']['Server'] = '0.0.0.0'
config['SFTP - Remote Server']['Username'] = 'user'
config['SFTP - Remote Server']['Password'] = 'password'
config['SFTP - Remote Server'][';'] = 'If a different Port for SFTP needs to be used'
config['SFTP - Remote Server'][';'] = 'If a different Port for SFTP needs to be used (Default: 22)'
config['SFTP - Remote Server']['SFTPPort'] = '22'
config['SFTP - Remote Server'][';_'] = 'If a different Port for FTP needs to be used (Default: 21)'
config['SFTP - Remote Server']['FTPPort'] = '21'
config['SFTP - Remote Server'][';_'] = 'Change the path below if the plugin folder path is different on the SFTP/FTP server (Change only if you know what you are doing)'
config['SFTP - Remote Server']['PluginFolderOnServer'] = '/plugins'
config['SFTP - Remote Server'][';__'] = 'If you want to use FTP instead of SFTP change to (False) else use (True)'

View File

@ -12,7 +12,7 @@ def createFTPConnection():
configValues = configurationValues()
try:
ftp = ftplib.FTP()
ftp.connect(configValues.sftp_server, configValues.sftp_port)
ftp.connect(configValues.sftp_server, configValues.ftp_port)
ftp.login(configValues.sftp_user, configValues.sftp_password)
return ftp
except UnboundLocalError: