Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1751 from getnikola/1747
fix #1747
  • Loading branch information
ralsina committed May 24, 2015
2 parents b4349fd + ce40295 commit b061fb9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -14,6 +14,7 @@ Features
Bugfixes
--------

* Avoid some rebuild loops (Issue #1747)
* Better error if two posts/pages output conflict (Issue #1749)
* Scanning of posts refactored out of core (Issue #1700)
* github_deploy records lastdeploy timestamp like regular deploy
Expand Down
9 changes: 8 additions & 1 deletion nikola/post.py
Expand Up @@ -235,7 +235,14 @@ def __repr__(self):
m = hashlib.md5()
# source_path modification date (to avoid reading it)
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'))
clean_meta = {}
for k, v in self.meta.items():
sub_meta = {}
clean_meta[k] = sub_meta
for kk, vv in v.items():
if vv:
sub_meta[kk] = vv
m.update(utils.unicode_str(json.dumps(clean_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 b061fb9

Please sign in to comment.