Modified FTP upload script

This commit is contained in:
Manuel Cortez 2020-02-23 23:50:02 -06:00
parent aacaa528fb
commit 4955986c3e

View File

@ -38,7 +38,7 @@ 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)
print("Logged in successfully") print("Logged in successfully")
connection.cwd("static/files/") connection.cwd("socializer.su/static/files/")
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)