소스 검색

flush to disk to prevent data loss

Daniel Sheffield 2 년 전
부모
커밋
521720aecb
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      grocery_transactions.py

+ 1 - 0
grocery_transactions.py

@@ -174,6 +174,7 @@ class GroceryTransactionEditor(urwid.WidgetPlaceholder):
             f"$descr${description}$descr$, {quantity}, $unit${unit}$unit$, " \
             f"{price}, $produ${product}$produ$, {organic});\n"
         self.log.write(statement)
+        self.log.flush()
         self.cur.execute(statement)
 
 cur.execute("BEGIN")