Smarter UUID creation for DayOne journals

This commit is contained in:
Manuel Ebert 2012-08-09 18:42:31 +02:00
parent 9476d3f115
commit fd0d35e151

View file

@ -308,7 +308,7 @@ class DayOne(Journal):
# have a new one! # have a new one!
if not hasattr(entry, "uuid"): if not hasattr(entry, "uuid"):
new_uuid = uuid.uuid1().hex new_uuid = uuid.uuid1().hex
filename = os.path.join(self.config['journal'], "entries", uuid+".doentry") filename = os.path.join(self.config['journal'], "entries", new_uuid+".doentry")
entry_plist = { entry_plist = {
'Creation Date': entry.date, 'Creation Date': entry.date,
'Starred': entry.starred if hasattr(entry, 'starred') else False, 'Starred': entry.starred if hasattr(entry, 'starred') else False,