Skip to content

Commit

Permalink
added Username to config and uploaded filename
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenChords committed Jul 19, 2020
1 parent cd33e6a commit dfb1a5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FTPManagement.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
from ftplib import FTP
from logger import log
from config import getConfig

ftp = FTP("ftp.byethost7.com")
ftp.login("b7_26300774", "Wxu8dLdV2/")
Expand Down Expand Up @@ -44,7 +45,7 @@ def testRecord(value):
ftp.cwd("htdocs/roadmap/results")
if(localRecord <= remoteRecord):
with open("results/[" + str(localRecord) + "].txt", "rb") as localFile:
ftp.storlines("STOR %s" % "[" + str(localRecord) + "].txt", localFile)
ftp.storlines("STOR %s" % "[" + str(localRecord) + "]_" + getConfig("Username") + ".txt", localFile)
localFile.close()
log(1, "FTP", "File", "Upload", "File [" + str(localRecord) + "].txt has been uploaded.")
ftp.quit()
8 changes: 8 additions & 0 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@
###############################################
# [workerCount = 4] (default: 4) #
###############################################

###############################################
# Username #
###############################################
# Your username under which your records are #
# Uploaded to the remote server #
# [Username = DefaultUser] #
###############################################

0 comments on commit dfb1a5a

Please sign in to comment.