Skip to content

Commit f3d5aa9

Browse files
committed
Modify logging message
1 parent a977dbf commit f3d5aa9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

LeetCode_AC_Code_Crawler.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,23 @@ def save_ac_code(ac_list, premium):
8181
if not os.path.exists(outputDir + "\\" + folderName):
8282
os.makedirs(outputDir + "\\" + folderName)
8383

84+
fileName = "{}.{}".format("Solution" + str(i).zfill(2), suff)
8485
completeName = os.path.join(
85-
outputDir + "\\" + folderName, "{}.{}".format("Solution" + str(i).zfill(2), suff))
86+
outputDir + "\\" + folderName, fileName)
8687
sys.stdout.write(" "*60 + "\r")
8788
if not os.path.exists(completeName):
88-
print(folderName + " saved.")
89+
print(folderName + "\\" + fileName + " saved.")
8990
file = codecs.open(completeName, "w", encoding='utf8')
9091
file.write(submission_detail+code)
9192
file.close()
9293
else:
9394
if overwrite == True:
94-
print(folderName + " overwritten.")
95+
print(folderName + "\\" + fileName + " overwritten.")
9596
file = open(completeName, "w")
9697
file.write(submission_detail+code)
9798
file.close()
9899
else:
99-
print(folderName + " skipped.")
100+
print(folderName + "\\" + fileName + " skipped.")
100101

101102
processed_nums += 1
102103

0 commit comments

Comments
 (0)