Oh Python 3 imports...

This commit is contained in:
Manuel Ebert 2013-07-15 13:55:34 +02:00
parent a404ff95d1
commit 3bba14a553
3 changed files with 5 additions and 3 deletions

View file

@ -3,7 +3,8 @@
try: from . import Entry try: from . import Entry
except (SystemError, ValueError): 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 codecs
import os import os
try: import parsedatetime.parsedatetime_consts as pdt 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.""" of filenames, interpret each as a plist file and create a new entry from that."""
self.entries = [] self.entries = []
for filename in filenames: for filename in filenames:
with open(filename) as plist_entry: with open(filename, 'rb') as plist_entry:
dict_entry = plistlib.readPlist(plist_entry) dict_entry = plistlib.readPlist(plist_entry)
try: try:
timezone = pytz.timezone(dict_entry['Time Zone']) timezone = pytz.timezone(dict_entry['Time Zone'])

View file

@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line.
""" """
__title__ = 'jrnl' __title__ = 'jrnl'
__version__ = '1.2.0' __version__ = '1.2.1'
__author__ = 'Manuel Ebert' __author__ = 'Manuel Ebert'
__license__ = 'MIT License' __license__ = 'MIT License'
__copyright__ = 'Copyright 2013 Manuel Ebert' __copyright__ = 'Copyright 2013 Manuel Ebert'

1
tmp_log.bak Normal file
View file

@ -0,0 +1 @@
</ul>