Clear the contents of the file, in case the file exists already.

pull/32/head
Christian Jacobs 2015-02-07 21:44:34 +00:00
rodzic 69d1a95f51
commit 2c5c046a7a
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -66,6 +66,8 @@ class Logbook(Gtk.Notebook):
logging.debug("No file path specified.")
return
else:
# Clear the contents of the file, in case the file exists already.
open(path, 'w').close()
# Open the new logbook, ready for use.
self.open(path=path)