From 3bba14a553c8de548827bb44a0d3981252a027fc Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 15 Jul 2013 13:55:34 +0200 Subject: [PATCH] Oh Python 3 imports... --- jrnl/Journal.py | 5 +++-- jrnl/__init__.py | 2 +- tmp_log.bak | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 tmp_log.bak diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 88d1b6c7..d4e733ea 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -3,7 +3,8 @@ try: from . import Entry except (SystemError, ValueError): import Entry -from util import get_local_timezone +try: from .util import get_local_timezone +except (SystemError, ValueError): from util import get_local_timezone import codecs import os try: import parsedatetime.parsedatetime_consts as pdt @@ -308,7 +309,7 @@ class DayOne(Journal): of filenames, interpret each as a plist file and create a new entry from that.""" self.entries = [] for filename in filenames: - with open(filename) as plist_entry: + with open(filename, 'rb') as plist_entry: dict_entry = plistlib.readPlist(plist_entry) try: timezone = pytz.timezone(dict_entry['Time Zone']) diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 09f0d8fe..7f9e2402 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line. """ __title__ = 'jrnl' -__version__ = '1.2.0' +__version__ = '1.2.1' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 Manuel Ebert' diff --git a/tmp_log.bak b/tmp_log.bak new file mode 100644 index 00000000..3d3a44c9 --- /dev/null +++ b/tmp_log.bak @@ -0,0 +1 @@ +