1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2024-11-21 13:34:18 +00:00

🧹 Remove superfluous file creation (closes #170)

This commit is contained in:
Steffo 2022-03-16 16:20:32 +01:00
parent 32bd6f6d84
commit 78b51e30f3
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -1341,12 +1341,6 @@ class Worker(threading.Thread):
log.debug("Generating __transaction_file")
# Retrieve all the transactions
transactions = self.session.query(db.Transaction).order_by(db.Transaction.transaction_id).all()
# Create the file if it doesn't exists
try:
with open(f"transactions_{self.chat.id}.csv", "x"):
pass
except IOError:
pass
# Write on the previously created file
with open(f"transactions_{self.chat.id}.csv", "w") as file:
# Write an header line