Skip to content
Permalink
Browse files

fix unicode thingies

  • Loading branch information
ralsina committed May 14, 2015
1 parent 25e8ef2 commit 12a23efbbb5dc325521bae5704c4b3fc71938534
Showing with 3 additions and 3 deletions.
  1. +1 −1 nikola/plugins/task/posts.py
  2. +2 −2 nikola/post.py
@@ -66,7 +66,7 @@ def tl_ch():
'basename': self.name,
'name': 'timeline_changes',
'actions': [tl_ch],
'uptodate': [utils.config_changed(str(kw['timeline']))],
'uptodate': [utils.config_changed({1: kw['timeline']})],
}

for lang in kw["translations"]:
@@ -234,8 +234,8 @@ def __repr__(self):
# Calculate a hash that represents most data about the post
m = hashlib.md5()
# source_path modification date (to avoid reading it)
m.update(repr(os.stat(self.source_path).st_mtime))
m.update(json.dumps(self.meta, cls=utils.CustomEncoder, sort_keys=True))
m.update(utils.unicode_str(os.stat(self.source_path).st_mtime).encode('utf-8'))
m.update(utils.unicode_str(json.dumps(self.meta, cls=utils.CustomEncoder, sort_keys=True)).encode('utf-8'))
return '<Post: {0} {1}>'.format(self.source_path, m.hexdigest())

def _has_pretty_url(self, lang):

0 comments on commit 12a23ef

Please sign in to comment.