Skip to content

Commit

Permalink
🧹 Remove superfluous file creation (closes Steffo99#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffo99 committed Mar 16, 2022
1 parent 32bd6f6 commit 78b51e3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,12 +1341,6 @@ def __transactions_file(self):
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
Expand Down

0 comments on commit 78b51e3

Please sign in to comment.