diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 94e89144..230171e5 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -118,7 +118,6 @@ class Journal(object): last_entry_pos = match.end() entries.append(Entry.Entry(self, date=new_date)) - # If no entries were found, treat all the existing text as an entry made now if not entries: entries.append(Entry.Entry(self, date=time.parse("now"))) @@ -218,7 +217,11 @@ class Journal(object): if not date: colon_pos = first_line.find(": ") if colon_pos > 0: - date = time.parse(raw[:colon_pos], default_hour=self.config['default_hour'], default_minute=self.config['default_minute']) + date = time.parse( + raw[:colon_pos], + default_hour=self.config['default_hour'], + default_minute=self.config['default_minute'] + ) if date: # Parsed successfully, strip that from the raw text starred = raw[:colon_pos].strip().endswith("*") raw = raw[colon_pos + 1:].strip() @@ -325,7 +328,10 @@ def open_journal(name, config, legacy=False): from . import DayOneJournal return DayOneJournal.DayOne(**config).open() else: - util.prompt(u"[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal'])) + util.prompt( + u"[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal']) + ) + sys.exit(1) if not config['encrypt']: