Attempted to fix the ftp upload script

This commit is contained in:
Manuel Cortez 2021-01-18 13:36:19 -06:00
parent 87a9e49f2b
commit 94960952b9

View File

@ -52,12 +52,12 @@ version = version.replace("v", "")
print("Uploading files to the Socializer server...") print("Uploading files to the Socializer server...")
print("Connecting to %s" % (ftp_server,)) print("Connecting to %s" % (ftp_server,))
connection = MyFTP_TLS(ftp_server) connection = ftplib.FTP(ftp_server)
print("Connected to FTP server {}".format(ftp_server,)) print("Connected to FTP server {}".format(ftp_server,))
connection.login(user=ftp_username, passwd=ftp_password) connection.login(user=ftp_username, passwd=ftp_password)
connection.prot_p() #connection.prot_p()
print("Logged in successfully") print("Logged in successfully")
connection.cwd("socializer.su/static/files/") connection.cwd("socializer")
if version not in connection.nlst(): if version not in connection.nlst():
print("Creating version directory {} because does not exists...".format(version,)) print("Creating version directory {} because does not exists...".format(version,))
connection.mkd(version) connection.mkd(version)