Skip to content

Commit

Permalink
修复第一次使用之后不会累加记录
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyn101 committed Oct 3, 2023
1 parent a9a82c4 commit 138f1c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arknights_mower/utils/depot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ def process_itemlist(d):
# Check if file exists, if not, create the file
if not os.path.exists(depot_file):
with open(depot_file, "w", newline="", encoding="utf-8") as csvfile:
fieldnames = itemlist.keys()
fieldnames = ["时间", "data"]
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
writer.writeheader()
writer.writerow({"时间": current_datetime, "data": '{"空":0}'})

# Append data to the CSV file
with open(depot_file, "a", newline="", encoding="utf-8") as csvfile:
Expand Down

0 comments on commit 138f1c6

Please sign in to comment.