mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
Oh Python 3 imports...
This commit is contained in:
parent
a404ff95d1
commit
3bba14a553
3 changed files with 5 additions and 3 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue