mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
Python 2.6 compatibility
This commit is contained in:
parent
974f5a0f9c
commit
4e36d7baf0
4 changed files with 9 additions and 9 deletions
|
@ -181,7 +181,7 @@ class Journal(object):
|
|||
return self.__unicode__()
|
||||
|
||||
def __repr__(self):
|
||||
return "<Journal with {} entries>".format(len(self.entries))
|
||||
return "<Journal with {0} entries>".format(len(self.entries))
|
||||
|
||||
def write(self, filename=None):
|
||||
"""Dumps the journal into the config file, overwriting it"""
|
||||
|
@ -234,7 +234,7 @@ class Journal(object):
|
|||
for m in matches:
|
||||
date = e.date.strftime(self.config['timeformat'])
|
||||
excerpt = e.body[m.start():min(len(e.body), m.end()+60)]
|
||||
res.append('{} {} ..'.format(date, excerpt))
|
||||
res.append('{0} {1} ..'.format(date, excerpt))
|
||||
e.body = "\n".join(res)
|
||||
else:
|
||||
for e in self.entries:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue