소스 검색

create new txn file if doesn't exist

Daniel Sheffield 8 달 전
부모
커밋
fc4ef29cc7
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      grocery_transactions.py

+ 3 - 0
grocery_transactions.py

@@ -42,6 +42,9 @@ class GroceryTransactionEditor(WidgetPlaceholder):
         self.cur = cur
         txn: TransactionEditor = self.activity_manager.get('transaction')
 
+        with open(log, 'a') as f:
+            pass
+
         with open(log, 'r') as f:
             date = None
             store = None