From 6ed607acc541ea54d0fce0640d6a0d7e3b969684 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 5 Apr 2012 13:31:46 +0200 Subject: [PATCH] Fixed bug where empty journal file results in None being added to Journal.entries --- jrnl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jrnl.py b/jrnl.py index d17856dd..0cb2d89f 100755 --- a/jrnl.py +++ b/jrnl.py @@ -95,7 +95,8 @@ class Journal: # In this case, just append line to our body. current_entry.body += line # Append last entry - entries.append(current_entry) + if current_entry: + entries.append(current_entry) journal_file.close() for entry in entries: entry.parse_tags()