Skip to content

Commit

Permalink
fix unicode thingies
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed May 14, 2015
1 parent 25e8ef2 commit 12a23ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nikola/plugins/task/posts.py
Expand Up @@ -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"]:
Expand Down
4 changes: 2 additions & 2 deletions nikola/post.py
Expand Up @@ -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):
Expand Down

0 comments on commit 12a23ef

Please sign in to comment.